Index: webrequest.js |
diff --git a/webrequest.js b/webrequest.js |
index bb409c600b09415c69b04b6bfd6d60d11f95ceff..213da10ac422f10b90f190ec120c1afe09aa23f9 100644 |
--- a/webrequest.js |
+++ b/webrequest.js |
@@ -18,6 +18,12 @@ |
var FilterNotifier = require("filterNotifier").FilterNotifier; |
var RegExpFilter = require("filterClasses").RegExpFilter; |
var platform = require("info").platform; |
+var whitelisting = require("whitelisting"); |
+var defaultMatcher = require("matcher").defaultMatcher; |
+var url = require("url"); |
+var stringifyURL = url.stringifyURL; |
+var isThirdParty = url.isThirdParty; |
+var extractHostFromFrame = url.extractHostFromFrame; |
ext.webRequest.indistinguishableTypes.forEach(function(types) |
{ |
@@ -54,13 +60,14 @@ function onBeforeRequestAsync(url, type, page, filter) |
function onBeforeRequest(url, type, page, frame) |
{ |
- if (isFrameWhitelisted(page, frame)) |
+ if (whitelisting.isFrameWhitelisted(page, frame)) |
return true; |
var docDomain = extractHostFromFrame(frame); |
- var key = getKey(page, frame); |
- var specificOnly = isFrameWhitelisted(page, frame, |
- RegExpFilter.typeMap.GENERICBLOCK); |
+ var key = whitelisting.getKey(page, frame); |
+ var specificOnly = whitelisting.isFrameWhitelisted( |
+ page, frame, RegExpFilter.typeMap.GENERICBLOCK |
+ ); |
var filter = defaultMatcher.matchesAny( |
stringifyURL(url), |
RegExpFilter.typeMap[type], docDomain, |