| 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-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 |
| 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 */ | 18 /* globals require */ |
| 19 | 19 |
| 20 "use strict"; | 20 "use strict"; |
| 21 | 21 |
| 22 (function(global) | 22 (function(global) |
| 23 { | 23 { |
| 24 let ext = global.ext || require("ext_background"); | 24 let ext = global.ext || require("ext_background"); |
| 25 | 25 |
| 26 const {port} = require("messaging"); | 26 const {port} = require("messaging"); |
| 27 const {Prefs} = require("prefs"); | 27 const {Prefs} = require("prefs"); |
| 28 const {compareVersion} = require("coreUtils"); | |
| 29 const {Utils} = require("utils"); | 28 const {Utils} = require("utils"); |
| 30 const {FilterStorage} = require("filterStorage"); | 29 const {FilterStorage} = require("filterStorage"); |
| 31 const {FilterNotifier} = require("filterNotifier"); | 30 const {FilterNotifier} = require("filterNotifier"); |
| 32 const {defaultMatcher} = require("matcher"); | 31 const {defaultMatcher} = require("matcher"); |
| 33 const {ElemHideEmulation} = require("elemHideEmulation"); | 32 const {ElemHideEmulation} = require("elemHideEmulation"); |
| 34 const {Notification: NotificationStorage} = require("notification"); | 33 const {Notification: NotificationStorage} = require("notification"); |
| 35 | 34 |
| 36 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses"); | 35 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses"); |
| 37 const {Synchronizer} = require("synchronizer"); | 36 const {Synchronizer} = require("synchronizer"); |
| 38 | 37 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 bidiDir = Utils.readingDirection; | 170 bidiDir = Utils.readingDirection; |
| 172 | 171 |
| 173 return {locale: Utils.appLocale, bidiDir}; | 172 return {locale: Utils.appLocale, bidiDir}; |
| 174 } | 173 } |
| 175 | 174 |
| 176 if (message.what == "features") | 175 if (message.what == "features") |
| 177 { | 176 { |
| 178 return { | 177 return { |
| 179 devToolsPanel: info.platform == "chromium" || | 178 devToolsPanel: info.platform == "chromium" || |
| 180 info.application == "firefox" && | 179 info.application == "firefox" && |
| 181 compareVersion(info.applicationVersion, "54") >= 0 | 180 parseInt(info.applicationVersion, 10) >= 54 |
| 182 }; | 181 }; |
| 183 } | 182 } |
| 184 | 183 |
| 185 return info[message.what]; | 184 return info[message.what]; |
| 186 }); | 185 }); |
| 187 | 186 |
| 188 port.on("app.listen", (message, sender) => | 187 port.on("app.listen", (message, sender) => |
| 189 { | 188 { |
| 190 getListenerFilters(sender.page).app = message.filter; | 189 getListenerFilters(sender.page).app = message.filter; |
| 191 }); | 190 }); |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 if (message.url) | 427 if (message.url) |
| 429 subscriptions = [Subscription.fromURL(message.url)]; | 428 subscriptions = [Subscription.fromURL(message.url)]; |
| 430 | 429 |
| 431 for (let subscription of subscriptions) | 430 for (let subscription of subscriptions) |
| 432 { | 431 { |
| 433 if (subscription instanceof DownloadableSubscription) | 432 if (subscription instanceof DownloadableSubscription) |
| 434 Synchronizer.execute(subscription, true); | 433 Synchronizer.execute(subscription, true); |
| 435 } | 434 } |
| 436 }); | 435 }); |
| 437 })(this); | 436 })(this); |
| LEFT | RIGHT |