| Left: | ||
| Right: |
| 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 |
| 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 // Make sure that the required modules get loaded | |
|
Sebastian Noack
2016/05/31 11:42:13
As you might have realized this file has shrinked
Wladimir Palant
2016/05/31 13:47:54
Ok, I've implemented it as an option in JSHydra. T
kzar
2016/05/31 14:54:08
The new approach makes sense to me, but the only t
| |
| 19 require("filterListener"); | |
| 20 require("synchronizer"); | |
| 21 require("notification"); | |
| 22 require("messageResponder"); | |
| 23 | |
| 18 var RegExpFilter = require("filterClasses").RegExpFilter; | 24 var RegExpFilter = require("filterClasses").RegExpFilter; |
| 19 var ElemHide = require("elemHide").ElemHide; | 25 var ElemHide = require("elemHide").ElemHide; |
| 20 var checkWhitelisted = require("whitelisting").checkWhitelisted; | 26 var checkWhitelisted = require("whitelisting").checkWhitelisted; |
| 21 var extractHostFromFrame = require("url").extractHostFromFrame; | 27 var extractHostFromFrame = require("url").extractHostFromFrame; |
| 22 var port = require("messaging").port; | 28 var port = require("messaging").port; |
| 23 var devtools = require("devtools"); | 29 var devtools = require("devtools"); |
| 24 | 30 |
| 25 port.on("get-selectors", function(msg, sender) | 31 port.on("get-selectors", function(msg, sender) |
| 26 { | 32 { |
| 27 var selectors; | 33 var selectors; |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 50 targetPage = sender.page; | 56 targetPage = sender.page; |
| 51 | 57 |
| 52 if (targetPage) | 58 if (targetPage) |
| 53 { | 59 { |
| 54 msg.payload.sender = sender.page.id; | 60 msg.payload.sender = sender.page.id; |
| 55 if (msg.expectsResponse) | 61 if (msg.expectsResponse) |
| 56 return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); | 62 return new Promise(targetPage.sendMessage.bind(targetPage, msg.payload)); |
| 57 targetPage.sendMessage(msg.payload); | 63 targetPage.sendMessage(msg.payload); |
| 58 } | 64 } |
| 59 }); | 65 }); |
| OLD | NEW |