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 with(require("filterClasses")) | 18 var RegExpFilter = require("filterClasses").RegExpFilter; |
19 { | |
20 this.RegExpFilter = RegExpFilter; | |
21 this.WhitelistFilter = WhitelistFilter; | |
22 } | |
23 var FilterStorage = require("filterStorage").FilterStorage; | |
24 var SpecialSubscription = require("subscriptionClasses").SpecialSubscription; | |
25 var ElemHide = require("elemHide").ElemHide; | 19 var ElemHide = require("elemHide").ElemHide; |
26 var checkWhitelisted = require("whitelisting").checkWhitelisted; | 20 var checkWhitelisted = require("whitelisting").checkWhitelisted; |
27 var extractHostFromFrame = require("url").extractHostFromFrame; | 21 var extractHostFromFrame = require("url").extractHostFromFrame; |
28 var port = require("messaging").port; | 22 var port = require("messaging").port; |
29 var devtools = require("devtools"); | 23 var devtools = require("devtools"); |
30 | 24 |
31 port.on("get-selectors", function(msg, sender) | 25 port.on("get-selectors", function(msg, sender) |
32 { | 26 { |
33 var selectors; | 27 var selectors; |
34 var trace = devtools && devtools.hasPanel(sender.page); | 28 var trace = devtools && devtools.hasPanel(sender.page); |
(...skipping 21 matching lines...) Expand all Loading... |
56 targetPage = sender.page; | 50 targetPage = sender.page; |
57 | 51 |
58 if (targetPage) | 52 if (targetPage) |
59 { | 53 { |
60 msg.payload.sender = sender.page.id; | 54 msg.payload.sender = sender.page.id; |
61 if (msg.expectsResponse) | 55 if (msg.expectsResponse) |
62 return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); | 56 return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); |
63 targetPage.sendMessage(msg.payload); | 57 targetPage.sendMessage(msg.payload); |
64 } | 58 } |
65 }); | 59 }); |
LEFT | RIGHT |