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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 15 matching lines...) Expand all Loading... |
26 /** | 26 /** |
27 * Indicates whether the element hiding stylesheet is currently applied. | 27 * Indicates whether the element hiding stylesheet is currently applied. |
28 * @type Boolean | 28 * @type Boolean |
29 */ | 29 */ |
30 let applied = false; | 30 let applied = false; |
31 | 31 |
32 /** | 32 /** |
33 * Stylesheet URL to be registered | 33 * Stylesheet URL to be registered |
34 * @type nsIURI | 34 * @type nsIURI |
35 */ | 35 */ |
36 let styleURL = Utils.makeURI("about:abp-elemhidehit?css"); | 36 let styleURL = Utils.makeURI("about:abp-elemhide?css"); |
37 | 37 |
38 function init() | 38 function init() |
39 { | 39 { |
40 port.on("getSelectors", () => ElemHide.getSelectors()); | 40 port.on("getSelectors", () => ElemHide.getSelectors()); |
41 | 41 |
42 apply(); | 42 apply(); |
43 onShutdown.add(unapply); | 43 onShutdown.add(unapply); |
44 | 44 |
45 Prefs.addListener(function(name) | 45 Prefs.addListener(function(name) |
46 { | 46 { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 { | 98 { |
99 Cu.reportError(e); | 99 Cu.reportError(e); |
100 } | 100 } |
101 applied = false; | 101 applied = false; |
102 } | 102 } |
103 } | 103 } |
104 | 104 |
105 // Send dummy message before initializing, this delay makes sure that the child | 105 // Send dummy message before initializing, this delay makes sure that the child |
106 // modules are loaded and our protocol handler registered. | 106 // modules are loaded and our protocol handler registered. |
107 port.emitWithResponse("ping").then(init); | 107 port.emitWithResponse("ping").then(init); |
OLD | NEW |