| LEFT | RIGHT |
| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 * GNU General Public License for more details. | 12 * GNU General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU General Public License | 14 * You should have received a copy of the GNU General Public License |
| 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. | 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| 16 */ | 16 */ |
| 17 | 17 |
| 18 /* globals require */ |
| 19 |
| 18 "use strict"; | 20 "use strict"; |
| 19 | 21 |
| 22 (function(global) |
| 20 { | 23 { |
| 21 if (typeof ext == "undefined") | 24 let ext = global.ext || require("ext_background"); |
| 22 window.ext = require("ext_background"); | |
| 23 | 25 |
| 24 const {port} = require("messaging"); | 26 const {port} = require("messaging"); |
| 25 const {Prefs} = require("prefs"); | 27 const {Prefs} = require("prefs"); |
| 26 const {Utils} = require("utils"); | 28 const {Utils} = require("utils"); |
| 27 const {FilterStorage} = require("filterStorage"); | 29 const {FilterStorage} = require("filterStorage"); |
| 28 const {FilterNotifier} = require("filterNotifier"); | 30 const {FilterNotifier} = require("filterNotifier"); |
| 29 const {defaultMatcher} = require("matcher"); | 31 const {defaultMatcher} = require("matcher"); |
| 30 const {ElemHideEmulation} = require("elemHideEmulation"); | 32 const {ElemHideEmulation} = require("elemHideEmulation"); |
| 31 const {Notification: NotificationStorage} = require("notification"); | 33 const {Notification: NotificationStorage} = require("notification"); |
| 32 | 34 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 changeListeners.set(page, listenerFilters); | 149 changeListeners.set(page, listenerFilters); |
| 148 } | 150 } |
| 149 return listenerFilters; | 151 return listenerFilters; |
| 150 } | 152 } |
| 151 | 153 |
| 152 port.on("app.get", (message, sender) => | 154 port.on("app.get", (message, sender) => |
| 153 { | 155 { |
| 154 if (message.what == "issues") | 156 if (message.what == "issues") |
| 155 { | 157 { |
| 156 let subscriptionInit = tryRequire("subscriptionInit"); | 158 let subscriptionInit = tryRequire("subscriptionInit"); |
| 157 return { | 159 let result = subscriptionInit ? subscriptionInit.reinitialized : false; |
| 158 filterlistsReinitialized: subscriptionInit | 160 return {filterlistsReinitialized: result}; |
| 159 ? subscriptionInit.reinitialized : false | |
| 160 }; | |
| 161 } | 161 } |
| 162 | 162 |
| 163 if (message.what == "doclink") | 163 if (message.what == "doclink") |
| 164 return Utils.getDocLink(message.link); | 164 return Utils.getDocLink(message.link); |
| 165 | 165 |
| 166 if (message.what == "localeInfo") | 166 if (message.what == "localeInfo") |
| 167 { | 167 { |
| 168 let bidiDir; | 168 let bidiDir; |
| 169 if ("chromeRegistry" in Utils) | 169 if ("chromeRegistry" in Utils) |
| 170 { | 170 { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 let {subscriptions} = FilterStorage; | 421 let {subscriptions} = FilterStorage; |
| 422 if (message.url) | 422 if (message.url) |
| 423 subscriptions = [Subscription.fromURL(message.url)]; | 423 subscriptions = [Subscription.fromURL(message.url)]; |
| 424 | 424 |
| 425 for (let subscription of subscriptions) | 425 for (let subscription of subscriptions) |
| 426 { | 426 { |
| 427 if (subscription instanceof DownloadableSubscription) | 427 if (subscription instanceof DownloadableSubscription) |
| 428 Synchronizer.execute(subscription, true); | 428 Synchronizer.execute(subscription, true); |
| 429 } | 429 } |
| 430 }); | 430 }); |
| 431 } | 431 })(this); |
| LEFT | RIGHT |