| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 2  * This file is part of Adblock Plus <https://adblockplus.org/>, | 
| 3  * Copyright (C) 2006-2017 eyeo GmbH | 3  * Copyright (C) 2006-2017 eyeo GmbH | 
| 4  * | 4  * | 
| 5  * Adblock Plus is free software: you can redistribute it and/or modify | 5  * Adblock Plus is free software: you can redistribute it and/or modify | 
| 6  * it under the terms of the GNU General Public License version 3 as | 6  * it under the terms of the GNU General Public License version 3 as | 
| 7  * published by the Free Software Foundation. | 7  * published by the Free Software Foundation. | 
| 8  * | 8  * | 
| 9  * Adblock Plus is distributed in the hope that it will be useful, | 9  * Adblock Plus is distributed in the hope that it will be useful, | 
| 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 95       } | 95       } | 
| 96     } | 96     } | 
| 97   }; | 97   }; | 
| 98 | 98 | 
| 99   modules.prefs = {Prefs: new EventEmitter()}; | 99   modules.prefs = {Prefs: new EventEmitter()}; | 
| 100   let prefs = { | 100   let prefs = { | 
| 101     notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], | 101     notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], | 
| 102     notifications_showui: params.showNotificationUI, | 102     notifications_showui: params.showNotificationUI, | 
| 103     shouldShowBlockElementMenu: true, | 103     shouldShowBlockElementMenu: true, | 
| 104     show_devtools_panel: true, | 104     show_devtools_panel: true, | 
| 105     subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc
     eptionrules.txt" | 105     subscriptions_exceptionsurl: "https://easylist-downloads.adblockplus.org/exc
     eptionrules.txt", | 
|  | 106     subscriptions_exceptionsurl_privacy: "https://easylist-downloads.adblockplus
     .org/exceptionrules-privacy.txt" | 
| 106   }; | 107   }; | 
| 107   for (let key of Object.keys(prefs)) | 108   for (let key of Object.keys(prefs)) | 
| 108   { | 109   { | 
| 109     Object.defineProperty(modules.prefs.Prefs, key, { | 110     Object.defineProperty(modules.prefs.Prefs, key, { | 
| 110       get() | 111       get() | 
| 111       { | 112       { | 
| 112         return prefs[key]; | 113         return prefs[key]; | 
| 113       }, | 114       }, | 
| 114       set(value) | 115       set(value) | 
| 115       { | 116       { | 
| (...skipping 18 matching lines...) Expand all  Loading... | 
| 134     } | 135     } | 
| 135   }; | 136   }; | 
| 136 | 137 | 
| 137   function Subscription(url) | 138   function Subscription(url) | 
| 138   { | 139   { | 
| 139     this.url = url; | 140     this.url = url; | 
| 140     this._disabled = false; | 141     this._disabled = false; | 
| 141     this._lastDownload = 1234; | 142     this._lastDownload = 1234; | 
| 142     this.homepage = "https://easylist.adblockplus.org/"; | 143     this.homepage = "https://easylist.adblockplus.org/"; | 
| 143     this.downloadStatus = params.downloadStatus; | 144     this.downloadStatus = params.downloadStatus; | 
|  | 145 | 
|  | 146     if (this.url == prefs.subscriptions_exceptionsurl) | 
|  | 147     { | 
|  | 148       this.title = "Allow non-intrusive advertising"; | 
|  | 149     } | 
|  | 150     else if (this.url == prefs.subscriptions_exceptionsurl_privacy) | 
|  | 151     { | 
|  | 152       this.title = "Allow only nonintrusive ads that are privacy-friendly"; | 
|  | 153     } | 
| 144   } | 154   } | 
| 145   Subscription.prototype = | 155   Subscription.prototype = | 
| 146   { | 156   { | 
| 147     get disabled() | 157     get disabled() | 
| 148     { | 158     { | 
| 149       return this._disabled; | 159       return this._disabled; | 
| 150     }, | 160     }, | 
| 151     set disabled(value) | 161     set disabled(value) | 
| 152     { | 162     { | 
| 153       this._disabled = value; | 163       this._disabled = value; | 
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 435     "###ad-bereich1-superbanner", | 445     "###ad-bereich1-superbanner", | 
| 436     "###ad-bereich2-08", | 446     "###ad-bereich2-08", | 
| 437     "###ad-bereich2-skyscrapper" | 447     "###ad-bereich2-skyscrapper" | 
| 438   ]; | 448   ]; | 
| 439   let knownFilters = filters.map(modules.filterClasses.Filter.fromText); | 449   let knownFilters = filters.map(modules.filterClasses.Filter.fromText); | 
| 440 | 450 | 
| 441   let subscriptions = [ | 451   let subscriptions = [ | 
| 442     "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt", | 452     "https://easylist-downloads.adblockplus.org/easylistgermany+easylist.txt", | 
| 443     "https://easylist-downloads.adblockplus.org/exceptionrules.txt", | 453     "https://easylist-downloads.adblockplus.org/exceptionrules.txt", | 
| 444     "https://easylist-downloads.adblockplus.org/fanboy-social.txt", | 454     "https://easylist-downloads.adblockplus.org/fanboy-social.txt", | 
|  | 455     "https://easylist-downloads.adblockplus.org/antiadblockfilters.txt", | 
| 445     "~user~786254" | 456     "~user~786254" | 
| 446   ]; | 457   ]; | 
| 447   let knownSubscriptions = Object.create(null); | 458   let knownSubscriptions = Object.create(null); | 
| 448   for (let subscriptionUrl of subscriptions) | 459   for (let subscriptionUrl of subscriptions) | 
| 449   { | 460   { | 
| 450     knownSubscriptions[subscriptionUrl] = | 461     knownSubscriptions[subscriptionUrl] = | 
| 451       modules.subscriptionClasses.Subscription.fromURL(subscriptionUrl); | 462       modules.subscriptionClasses.Subscription.fromURL(subscriptionUrl); | 
| 452   } | 463   } | 
| 453   let customSubscription = knownSubscriptions["~user~786254"]; | 464   let customSubscription = knownSubscriptions["~user~786254"]; | 
| 454 | 465 | 
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 540       }, | 551       }, | 
| 541       filter: { | 552       filter: { | 
| 542         text: "||example.com/some-annoying-popup$popup", | 553         text: "||example.com/some-annoying-popup$popup", | 
| 543         whitelisted: false, | 554         whitelisted: false, | 
| 544         userDefined: true, | 555         userDefined: true, | 
| 545         subscription: null | 556         subscription: null | 
| 546       } | 557       } | 
| 547     }); | 558     }); | 
| 548   }); | 559   }); | 
| 549 }()); | 560 }()); | 
| OLD | NEW | 
|---|