Permalink
Browse files

Update issue 7396

  Status: Fixed
  Merged into trunk

  Tested that EasyList is subscribed successfully whether or not it was
subscribed before the update.
  • Loading branch information...
michaelgundlach committed Feb 11, 2013
1 parent 346997c commit 91cbed3109fd9b59c0a030474b3070a0794c05d8
Showing with 20 additions and 6 deletions.
  1. +6 −2 _locales/en/messages.json
  2. +12 −3 filtering/myfilters.js
  3. +2 −1 pages/adreport.html
@@ -394,7 +394,7 @@
"description": "A filter list. If it's the filter list for your language, please add '(recommended)'"
},
"filterczech": {
- "message": "Czech filters",
+ "message": "Czech and Slovak filters",
"description": "A filter list. If it's the filter list for your language, please add '(recommended)'"
},
"filterdanish": {
@@ -609,6 +609,10 @@
"message": "Russian",
"description": "language"
},
+ "lang_slovak": {
+ "message": "Slovak",
+ "description": "language"
+ },
"lang_spanish": {
"message": "Spanish",
"description": "language"
@@ -1243,4 +1247,4 @@
"message": "If you want to use AdBlock on secure pages (pages with a lock icon in the toolbar), you first have to enable the option to allow access to secure pages.",
"description": "Content of an area in the ad report page in Opera. ⇒ makes a right arrow"
}
-}
+}
View
@@ -38,12 +38,19 @@ function MyFilters() {
sub.initialUrl = sub.initialUrl || official.url;
sub.url = sub.url || official.url;
- if (sub.initialUrl != official.url) {
+ if (sub.initialUrl !== official.url) {
// The official URL was changed. Use it. In case of a redirect, this
// doesn't happen as only sub.url is changed, not sub.initialUrl.
sub.initialUrl = official.url;
sub.url = official.url;
}
+
+ var isMissingRequiredList = (sub.requiresList !== official.requiresList);
+ if (official.requiresList && isMissingRequiredList && sub.subscribed) {
+ // A required list was added. Make sure main list subscribers get it.
+ if (this._subscriptions[official.requiresList])
+ this.changeSubscription(official.requiresList, {subscribed: true});
+ }
sub.requiresList = official.requiresList;
sub.subscribed = sub.subscribed || false;
}
@@ -411,6 +418,7 @@ MyFilters.prototype._load_default_subscriptions = function() {
case 'pl': return 'easylist_plus_polish';
case 'ro': return 'easylist_plus_romanian';
case 'ru': return 'russian';
+ case 'sk': return 'czech';
case 'uk': return 'russian';
case 'zh': return 'chinese';
default: return '';
@@ -480,8 +488,9 @@ MyFilters.prototype._make_subscription_options = function() {
url: "https://adblock-chinalist.googlecode.com/svn/trunk/adblock.txt",
requiresList: "easylist",
},
- "czech": { // Czech filters
- url: "http://adblock.dajbych.net/adblock.txt",
+ "czech": { // Additional Czech and Slovak filters
+ url: "https://adblock-czechoslovaklist.googlecode.com/svn/filters.txt",
+ requiresList: "easylist",
},
"danish": { // Danish filters
url: "http://adblock.schack.dk/block.txt",
View
@@ -92,7 +92,7 @@ <h2 i18n="correctfilters"></h2>
<option value="easylist;http://forums.lanik.us/" i18n="lang_english"></option>
<option value="easylist;easylist_plus_bulgarian;mailto:alex at stanev.org" i18n="lang_bulgarian"></option>
<option value="chinese;https://code.google.com/p/adblock-chinalist/issues/list" i18n="lang_chinese"></option>
- <option value="czech;http://adblock.dajbych.net/" i18n="lang_czech"></option>
+ <option value="czech;http://code.google.com/p/adblock-czechoslovaklist/" i18n="lang_czech"></option>
<option value="danish;mailto:henrik at schack.dk" i18n="lang_danish"></option>
<option value="easylist;dutch;https://code.google.com/p/dutchadblockfilters/issues/list" i18n="lang_dutch"></option>
<option value="easylist;easylist_plus_finnish;http://wiltteri.net/ilmoita/" i18n="lang_finnish"></option>
@@ -107,6 +107,7 @@ <h2 i18n="correctfilters"></h2>
<option value="easylist;easylist_plus_polish;mailto:admin at adblocklist.org" i18n="lang_polish"></option>
<option value="easylist;easylist_plus_romanian;mailto:mail at zoso.ro" i18n="lang_romanian"></option>
<option value="easylist;russian;http://forum.mozilla-russia.org/viewtopic.php?id=3679" i18n="lang_russian"></option>
+ <option value="czech;http://code.google.com/p/adblock-czechoslovaklist/" i18n="lang_slovak"></option>
<option value="easylist_plus_spanish;mailto:nauscopio at gmail.com" i18n="lang_spanish"></option>
<option value="easylist;russian;http://forum.mozilla-russia.org/viewtopic.php?id=3679" i18n="lang_ukranian"></option>
<option value="" i18n="other"></option>

0 comments on commit 91cbed3

Please sign in to comment.