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 |
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"); |
28 const {Utils} = require("utils"); | 29 const {Utils} = require("utils"); |
29 const {FilterStorage} = require("filterStorage"); | 30 const {FilterStorage} = require("filterStorage"); |
30 const {FilterNotifier} = require("filterNotifier"); | 31 const {FilterNotifier} = require("filterNotifier"); |
31 const {defaultMatcher} = require("matcher"); | 32 const {defaultMatcher} = require("matcher"); |
32 const {ElemHideEmulation} = require("elemHideEmulation"); | 33 const {ElemHideEmulation} = require("elemHideEmulation"); |
33 const {Notification: NotificationStorage} = require("notification"); | 34 const {Notification: NotificationStorage} = require("notification"); |
34 | 35 |
35 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses"); | 36 const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses"); |
36 const {Synchronizer} = require("synchronizer"); | 37 const {Synchronizer} = require("synchronizer"); |
37 | 38 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 } | 178 } |
178 else | 179 else |
179 bidiDir = Utils.readingDirection; | 180 bidiDir = Utils.readingDirection; |
180 | 181 |
181 return {locale: Utils.appLocale, bidiDir}; | 182 return {locale: Utils.appLocale, bidiDir}; |
182 } | 183 } |
183 | 184 |
184 if (message.what == "features") | 185 if (message.what == "features") |
185 { | 186 { |
186 return { | 187 return { |
187 devToolsPanel: info.platform == "chromium" | 188 devToolsPanel: info.platform == "chromium" || |
| 189 info.application == "firefox" && |
| 190 compareVersion(info.applicationVersion, "54") >= 0 |
188 }; | 191 }; |
189 } | 192 } |
190 | 193 |
191 return info[message.what]; | 194 return info[message.what]; |
192 }); | 195 }); |
193 | 196 |
194 port.on("app.listen", (message, sender) => | 197 port.on("app.listen", (message, sender) => |
195 { | 198 { |
196 getListenerFilters(sender.page).app = message.filter; | 199 getListenerFilters(sender.page).app = message.filter; |
197 }); | 200 }); |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 if (message.url) | 437 if (message.url) |
435 subscriptions = [Subscription.fromURL(message.url)]; | 438 subscriptions = [Subscription.fromURL(message.url)]; |
436 | 439 |
437 for (let subscription of subscriptions) | 440 for (let subscription of subscriptions) |
438 { | 441 { |
439 if (subscription instanceof DownloadableSubscription) | 442 if (subscription instanceof DownloadableSubscription) |
440 Synchronizer.execute(subscription, true); | 443 Synchronizer.execute(subscription, true); |
441 } | 444 } |
442 }); | 445 }); |
443 })(this); | 446 })(this); |
OLD | NEW |