| 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-present eyeo GmbH |    3  * Copyright (C) 2006-present 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  148     shouldDisplay() |  148     shouldDisplay() | 
|  149     { |  149     { | 
|  150       return true; |  150       return true; | 
|  151     } |  151     } | 
|  152   }; |  152   }; | 
|  153  |  153  | 
|  154   let subscriptionServer = "https://easylist-downloads.adblockplus.org"; |  154   let subscriptionServer = "https://easylist-downloads.adblockplus.org"; | 
|  155   let subscriptionDetails = { |  155   let subscriptionDetails = { | 
|  156     [`${subscriptionServer}/easylistgermany+easylist.txt`]: { |  156     [`${subscriptionServer}/easylistgermany+easylist.txt`]: { | 
|  157       title: "EasyList Germany+EasyList", |  157       title: "EasyList Germany+EasyList", | 
 |  158       filters: ["-ad-banner.", "-ad-big.", "-ad-bottom-", "-ad-button-"], | 
|  158       installed: true |  159       installed: true | 
|  159     }, |  160     }, | 
|  160     [`${subscriptionServer}/exceptionrules.txt`]: { |  161     [`${subscriptionServer}/exceptionrules.txt`]: { | 
|  161       title: "Allow non-intrusive advertising", |  162       title: "Allow non-intrusive advertising", | 
|  162       installed: true |  163       installed: true | 
|  163     }, |  164     }, | 
|  164     [`${subscriptionServer}/exceptionrules-privacy-friendly.txt`]: { |  165     [`${subscriptionServer}/exceptionrules-privacy-friendly.txt`]: { | 
|  165       title: "Allow only nonintrusive ads that are privacy-friendly" |  166       title: "Allow only nonintrusive ads that are privacy-friendly" | 
|  166     }, |  167     }, | 
|  167     [`${subscriptionServer}/fanboy-social.txt`]: { |  168     [`${subscriptionServer}/fanboy-social.txt`]: { | 
|  168       title: "Fanboy's Social Blocking List", |  169       title: "Fanboy's Social Blocking List", | 
|  169       installed: true |  170       installed: true | 
|  170     }, |  171     }, | 
|  171     [`${subscriptionServer}/antiadblockfilters.txt`]: { |  172     [`${subscriptionServer}/antiadblockfilters.txt`]: { | 
|  172       title: "Adblock Warning Removal List", |  173       title: "Adblock Warning Removal List", | 
|  173       installed: true, |  174       installed: true, | 
|  174       disabled: true |  175       disabled: true | 
|  175     }, |  176     }, | 
|  176     "~user~786254": { |  177     "~user~786254": { | 
|  177       installed: true |  178       installed: true | 
|  178     } |  179     } | 
|  179   }; |  180   }; | 
|  180  |  181  | 
|  181   function Subscription(url) |  182   function Subscription(url) | 
|  182   { |  183   { | 
|  183     this.url = url; |  184     this.url = url; | 
|  184     this._disabled = false; |  185     this._disabled = false; | 
|  185     this._lastDownload = 1234; |  186     this._lastDownload = 1234; | 
 |  187     this.filters = []; | 
|  186     this.homepage = "https://easylist.adblockplus.org/"; |  188     this.homepage = "https://easylist.adblockplus.org/"; | 
|  187     this.downloadStatus = params.downloadStatus; |  189     this.downloadStatus = params.downloadStatus; | 
|  188  |  190  | 
|  189     let details = subscriptionDetails[this.url]; |  191     let details = subscriptionDetails[this.url]; | 
|  190     if (details) |  192     if (details) | 
|  191     { |  193     { | 
|  192       this.disabled = !!details.disabled; |  194       this.disabled = !!details.disabled; | 
|  193       this.title = details.title || ""; |  195       this.title = details.title || ""; | 
 |  196       this.filters = this.filters.concat(details.filters); | 
|  194     } |  197     } | 
|  195   } |  198   } | 
|  196   Subscription.prototype = |  199   Subscription.prototype = | 
|  197   { |  200   { | 
|  198     get disabled() |  201     get disabled() | 
|  199     { |  202     { | 
|  200       return this._disabled; |  203       return this._disabled; | 
|  201     }, |  204     }, | 
|  202     set disabled(value) |  205     set disabled(value) | 
|  203     { |  206     { | 
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  309     } |  312     } | 
|  310   }; |  313   }; | 
|  311  |  314  | 
|  312   function Filter(text) |  315   function Filter(text) | 
|  313   { |  316   { | 
|  314     this.text = text; |  317     this.text = text; | 
|  315     this.disabled = false; |  318     this.disabled = false; | 
|  316   } |  319   } | 
|  317   Filter.fromText = (text) => new Filter(text); |  320   Filter.fromText = (text) => new Filter(text); | 
|  318  |  321  | 
 |  322   function ActiveFilter() | 
 |  323   { | 
 |  324   } | 
 |  325  | 
|  319   function BlockingFilter() |  326   function BlockingFilter() | 
|  320   { |  327   { | 
|  321   } |  328   } | 
|  322  |  329  | 
|  323   function RegExpFilter() |  330   function RegExpFilter() | 
|  324   { |  331   { | 
|  325   } |  332   } | 
|  326   RegExpFilter.typeMap = Object.create(null); |  333   RegExpFilter.typeMap = Object.create(null); | 
|  327  |  334  | 
|  328   modules.filterClasses = { |  335   modules.filterClasses = { | 
 |  336     ActiveFilter, | 
|  329     BlockingFilter, |  337     BlockingFilter, | 
|  330     Filter, |  338     Filter, | 
|  331     RegExpFilter |  339     RegExpFilter | 
|  332   }; |  340   }; | 
|  333  |  341  | 
|  334   modules.filterValidation = |  342   modules.filterValidation = | 
|  335   { |  343   { | 
|  336     parseFilter(text) |  344     parseFilter(text) | 
|  337     { |  345     { | 
|  338       if (params.filterError) |  346       if (params.filterError) | 
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  612       }, |  620       }, | 
|  613       filter: { |  621       filter: { | 
|  614         text: "||example.com/some-annoying-popup$popup", |  622         text: "||example.com/some-annoying-popup$popup", | 
|  615         whitelisted: false, |  623         whitelisted: false, | 
|  616         userDefined: true, |  624         userDefined: true, | 
|  617         subscription: null |  625         subscription: null | 
|  618       } |  626       } | 
|  619     }); |  627     }); | 
|  620   }); |  628   }); | 
|  621 }()); |  629 }()); | 
| OLD | NEW |