OLD | NEW |
1 with(require("filterClasses")) | 1 with(require("filterClasses")) |
2 { | 2 { |
3 this.Filter = Filter; | 3 this.Filter = Filter; |
4 this.RegExpFilter = RegExpFilter; | 4 this.RegExpFilter = RegExpFilter; |
5 this.BlockingFilter = BlockingFilter; | 5 this.BlockingFilter = BlockingFilter; |
6 this.WhitelistFilter = WhitelistFilter; | 6 this.WhitelistFilter = WhitelistFilter; |
7 } | 7 } |
8 with(require("subscriptionClasses")) | 8 with(require("subscriptionClasses")) |
9 { | 9 { |
10 this.Subscription = Subscription; | 10 this.Subscription = Subscription; |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 reportError(e); | 277 reportError(e); |
278 } | 278 } |
279 } | 279 } |
280 | 280 |
281 /** | 281 /** |
282 * This function is called on an extension update. It will add the default | 282 * This function is called on an extension update. It will add the default |
283 * filter subscription if necessary. | 283 * filter subscription if necessary. |
284 */ | 284 */ |
285 function addSubscription(prevVersion) | 285 function addSubscription(prevVersion) |
286 { | 286 { |
| 287 // Make sure to remove "Recommended filters", no longer necessary |
| 288 var toRemove = "https://easylist-downloads.adblockplus.org/chrome_supplement.t
xt"; |
| 289 if (toRemove in FilterStorage.knownSubscriptions) |
| 290 FilterStorage.removeSubscription(FilterStorage.knownSubscriptions[toRemove])
; |
| 291 |
287 // Add "acceptable ads" subscription for new users and users updating from old
ABP versions | 292 // Add "acceptable ads" subscription for new users and users updating from old
ABP versions |
288 var addAcceptable = (!prevVersion || Services.vc.compare(prevVersion, "2.1") <
0); | 293 var addAcceptable = (!prevVersion || Services.vc.compare(prevVersion, "2.1") <
0); |
289 if (addAcceptable) | 294 if (addAcceptable) |
290 { | 295 { |
291 addAcceptable = !FilterStorage.subscriptions.some(function(subscription) | 296 addAcceptable = !FilterStorage.subscriptions.some(function(subscription) |
292 { | 297 { |
293 return subscription.url == Prefs.subscriptions_exceptionsurl; | 298 return subscription.url == Prefs.subscriptions_exceptionsurl; |
294 }); | 299 }); |
295 } | 300 } |
296 | 301 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
538 refreshIconAndContextMenu(windows[i].tabs[j]); | 543 refreshIconAndContextMenu(windows[i].tabs[j]); |
539 }); | 544 }); |
540 | 545 |
541 // Update icon if a tab changes location | 546 // Update icon if a tab changes location |
542 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) | 547 chrome.tabs.onUpdated.addListener(function(tabId, changeInfo, tab) |
543 { | 548 { |
544 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"}) | 549 chrome.tabs.sendRequest(tabId, {reqtype: "clickhide-deactivate"}) |
545 if(changeInfo.status == "loading") | 550 if(changeInfo.status == "loading") |
546 refreshIconAndContextMenu(tab); | 551 refreshIconAndContextMenu(tab); |
547 }); | 552 }); |
OLD | NEW |