Index: lib/whitelisting.js |
diff --git a/lib/whitelisting.js b/lib/whitelisting.js |
index 129e775847c2229e272be68113210d439ef32fb4..3bf6a70a3af79812cb2daba95363d89aadcc7f3b 100644 |
--- a/lib/whitelisting.js |
+++ b/lib/whitelisting.js |
@@ -18,6 +18,7 @@ |
/** @module whitelisting */ |
let {defaultMatcher} = require("matcher"); |
+let {RegExpFilter} = require("filterClasses"); |
let {stringifyURL, getDecodedHostname, extractHostFromFrame, isThirdParty} = require("url"); |
let pagesWithKey = new ext.PageMap(); |
@@ -33,7 +34,7 @@ exports.isPageWhitelisted = function(page) |
let url = page.url; |
return defaultMatcher.whitelist.matchesAny( |
- stringifyURL(url), "DOCUMENT", |
+ stringifyURL(url), RegExpFilter.toTypeMask("DOCUMENT"), |
getDecodedHostname(url), false, null |
); |
}; |
@@ -56,7 +57,7 @@ exports.isFrameWhitelisted = function(page, frame, type) |
let documentHost = extractHostFromFrame(parent) || getDecodedHostname(url); |
let filter = defaultMatcher.whitelist.matchesAny( |
- stringifyURL(url), type || "DOCUMENT", |
+ stringifyURL(url), RegExpFilter.toTypeMask(type || "DOCUMENT"), |
Sebastian Noack
2015/07/09 15:28:52
And here as well.
kzar
2015/07/12 14:28:01
Done.
|
documentHost, isThirdParty(url, documentHost), |
getKey(page, frame) |
); |