| Index: webrequest.js |
| =================================================================== |
| --- a/webrequest.js |
| +++ b/webrequest.js |
| @@ -15,6 +15,8 @@ |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| +var FilterNotifier = require("filterNotifier").FilterNotifier; |
| + |
| chrome.webRequest.onBeforeRequest.addListener(onBeforeRequest, {urls: ["http://*/*", "https://*/*"]}, ["blocking"]); |
| chrome.webRequest.onHeadersReceived.addListener(onHeadersReceived, {urls: ["http://*/*", "https://*/*"]}, ["responseHeaders"]); |
| chrome.tabs.onRemoved.addListener(forgetTab); |
| @@ -37,7 +39,7 @@ |
| 'load': true |
| }; |
| -require("filterNotifier").FilterNotifier.addListener(function(action) |
| +FilterNotifier.addListener(function(action) |
| { |
| if (action in importantNotifications) |
| { |
| @@ -70,6 +72,7 @@ |
| var frame = (type != "SUBDOCUMENT" ? details.frameId : details.parentFrameId); |
| var filter = checkRequest(type, details.tabId, details.url, frame); |
| + FilterNotifier.triggerListeners("document.stats", filter, details.tabId); |
|
Wladimir Palant
2013/09/18 09:44:41
The usual notification is "filter.hitCount". This
Thomas Greiner
2013/09/19 09:42:29
I thought about it before but the arguments differ
Wladimir Palant
2013/09/19 10:56:22
I guess we can introduce an additional application
|
| if (filter instanceof BlockingFilter) |
| return {cancel: true}; |
| else |