[Pkg-mozext-commits] [adblock-plus] 09/22: Issue 417 - Show warning on first-run page if filterlists have been reinitialized

David Prévot taffit at moszumanska.debian.org
Thu Jun 5 14:01:09 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit a9f1b263966bb77f5eccc96e4608b576b643dfeb
Author: Thomas Greiner <thomas at adblockplus.org>
Date:   Tue May 27 17:09:31 2014 +0200

    Issue 417 - Show warning on first-run page if filterlists have been reinitialized
---
 chrome/content/ui/firstRun.html         |  5 +++--
 chrome/content/ui/firstRun.js           | 18 ++++++++++++++----
 chrome/locale/en-US/firstRun.properties |  1 +
 chrome/skin/firstRun.css                |  4 ++--
 4 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/chrome/content/ui/firstRun.html b/chrome/content/ui/firstRun.html
index a61a01c..c4f367b 100644
--- a/chrome/content/ui/firstRun.html
+++ b/chrome/content/ui/firstRun.html
@@ -37,8 +37,9 @@
         <h1 id="title-main" class="i18n_firstRun_title"></h1>
     </header>
 
-    <section id="legacySafariWarning" class="i18n_firstRun_legacySafariWarning" hidden="true"></section>
-    <section id="dataCorruptionWarning" class="i18n_firstRun_dataCorruptionWarning" hidden="true"></section>
+    <section id="legacySafariWarning" class="i18n_firstRun_legacySafariWarning warning" hidden="true"></section>
+    <section id="filterlistsReinitializedWarning" class="i18n_firstRun_filterlistsReinitializedWarning warning" hidden="true"></section>
+    <section id="dataCorruptionWarning" class="i18n_firstRun_dataCorruptionWarning warning" hidden="true"></section>
 
     <section id="acceptable-ads">
       <h2 class="i18n_firstRun_acceptableAdsHeadline"></h2>
diff --git a/chrome/content/ui/firstRun.js b/chrome/content/ui/firstRun.js
index c19fa09..be2caa6 100644
--- a/chrome/content/ui/firstRun.js
+++ b/chrome/content/ui/firstRun.js
@@ -56,11 +56,21 @@
     setLinks("acceptableAdsExplanation", Utils.getDocLink("acceptable_ads_criteria"), openFilters);
     setLinks("share-headline", Utils.getDocLink("contribute"));
 
-    // Show warning if data corruption was detected
-    if (typeof backgroundPage != "undefined" && backgroundPage.seenDataCorruption)
+    if (typeof backgroundPage != "undefined")
     {
-      E("dataCorruptionWarning").removeAttribute("hidden");
-      setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filterstorage"));
+      // Show warning if data corruption was detected
+      if (backgroundPage.seenDataCorruption)
+      {
+        E("dataCorruptionWarning").removeAttribute("hidden");
+        setLinks("dataCorruptionWarning", Utils.getDocLink("knownIssuesChrome_filterstorage"));
+      }
+
+      // Show warning if filterlists settings were reinitialized
+      if (backgroundPage.filterlistsReinitialized)
+      {
+        E("filterlistsReinitializedWarning").removeAttribute("hidden");
+        setLinks("filterlistsReinitializedWarning", openFilters);
+      }
     }
 
     // Show warning if Safari version isn't supported
diff --git a/chrome/locale/en-US/firstRun.properties b/chrome/locale/en-US/firstRun.properties
index f382750..21438b1 100644
--- a/chrome/locale/en-US/firstRun.properties
+++ b/chrome/locale/en-US/firstRun.properties
@@ -3,6 +3,7 @@ firstRun_dataCorruptionWarning=Does this page keep showing up? <a>Click here!</a
 firstRun_acceptableAdsHeadline=Annoying ads will now be blocked
 firstRun_acceptableAdsExplanation=We'd like to encourage websites to use straightforward, unobtrusive advertising. That's why we've established <a>strict guidelines</a> to identify acceptable ads, which are shown under default settings. If you still want to block every ad you can <a>disable</a> this in a few seconds.
 firstRun_legacySafariWarning=You are using an old version of Safari which is not supported by Adblock Plus. It might not work correctly or impair the user experience on some websites. We strongly recommend to either update to Safari 6.1.1 or higher (on OS X 10.8 Mountain Lion), or Safari 7.0.1 or higher (on OS X 10.9 Mavericks), or to use the latest version of Mozilla Firefox, Google Chrome or Opera.
+firstRun_filterlistsReinitializedWarning=It seems that an issue caused all filters to be removed and we were unable to restore a backup. Therefore we had to reset your filters and Acceptable Ads settings. Please check your filter lists and Acceptable Ads settings in the <a>Adblock Plus options</a>.
 
 firstRun_toggle_on=ON
 firstRun_toggle_off=OFF
diff --git a/chrome/skin/firstRun.css b/chrome/skin/firstRun.css
index e1491c4..7a02ad6 100644
--- a/chrome/skin/firstRun.css
+++ b/chrome/skin/firstRun.css
@@ -387,12 +387,12 @@ section > p
   background-repeat: no-repeat;
 }
 
-#legacySafariWarning,
-#dataCorruptionWarning
+.warning
 {
   font-size: 160%;
   border: 3px dashed red;
   text-align: center;
+  line-height: 1.3em;
 }
 
 #social ul

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list