LEFT | RIGHT |
(no file at all) | |
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-2017 eyeo GmbH | 3 * Copyright (C) 2006-2017 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 |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 let results = ext.webRequest.onBeforeRequest._dispatch( | 586 let results = ext.webRequest.onBeforeRequest._dispatch( |
587 new URL(details.url), | 587 new URL(details.url), |
588 type.toUpperCase(), | 588 type.toUpperCase(), |
589 new Page({id: details.tabId}), | 589 new Page({id: details.tabId}), |
590 frame | 590 frame |
591 ); | 591 ); |
592 | 592 |
593 if (results.indexOf(false) != -1) | 593 if (results.indexOf(false) != -1) |
594 return {cancel: true}; | 594 return {cancel: true}; |
595 } | 595 } |
596 }, {urls: ["<all_urls>"]}, ["blocking"]); | 596 }, {urls: ["https://*/*", "http://*/*", "ws://*/*", "wss://*/*"]}, ["blocking"
]); |
597 | 597 |
598 | 598 |
599 /* Message passing */ | 599 /* Message passing */ |
600 | 600 |
601 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => | 601 chrome.runtime.onMessage.addListener((message, rawSender, sendResponse) => |
602 { | 602 { |
603 let sender = {}; | 603 let sender = {}; |
604 | 604 |
605 // Add "page" and "frame" if the message was sent by a content script. | 605 // Add "page" and "frame" if the message was sent by a content script. |
606 // If sent by popup or the background page itself, there is no "tab". | 606 // If sent by popup or the background page itself, there is no "tab". |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 ext.windows = { | 724 ext.windows = { |
725 create(createData, callback) | 725 create(createData, callback) |
726 { | 726 { |
727 chrome.windows.create(createData, createdWindow => | 727 chrome.windows.create(createData, createdWindow => |
728 { | 728 { |
729 afterTabLoaded(callback)(createdWindow.tabs[0]); | 729 afterTabLoaded(callback)(createdWindow.tabs[0]); |
730 }); | 730 }); |
731 } | 731 } |
732 }; | 732 }; |
733 }()); | 733 }()); |
LEFT | RIGHT |