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); |
if (filter instanceof BlockingFilter) |
return {cancel: true}; |
else |