Skip to content

Commit

Permalink
Update issue 7396
Browse files Browse the repository at this point in the history
  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 91cbed3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
8 changes: 6 additions & 2 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -609,6 +609,10 @@
"message": "Russian",
"description": "language"
},
"lang_slovak": {
"message": "Slovak",
"description": "language"
},
"lang_spanish": {
"message": "Spanish",
"description": "language"
Expand Down Expand Up @@ -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"
}
}
}
15 changes: 12 additions & 3 deletions filtering/myfilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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 '';
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion pages/adreport.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down

0 comments on commit 91cbed3

Please sign in to comment.