Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: webrequest.js

Issue 5138680696012800: Issue 616 - Enforce $generichide and $genericblock in Chrome (Closed)
Patch Set: Created March 11, 2015, 5:09 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« background.js ('K') | « background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
diff --git a/webrequest.js b/webrequest.js
index 51737c5ed23e4cd6700fca4cd096a59170751d88..27457079396bdc0a73346746946c02e9c9f029fe 100644
--- a/webrequest.js
+++ b/webrequest.js
@@ -54,12 +54,14 @@ function onBeforeRequest(url, type, page, frame)
var docDomain = extractHostFromFrame(frame);
var key = getKey(page, frame);
+ var specificOnly = isFrameWhitelisted(page, frame, "GENERICBLOCK");
var filter = defaultMatcher.matchesAny(
stringifyURL(url),
type == "sub_frame" ? "SUBDOCUMENT" : type.toUpperCase(),
docDomain,
isThirdParty(url, docDomain),
- key
+ key,
+ specificOnly
Sebastian Noack 2015/03/12 12:36:12 I suppose this isn't the only call that needs to b
kzar 2015/03/12 19:22:45 Good point, I didn't consider popups! I updated my
);
// We can't listen to onHeadersReceived in Safari so we need to
« background.js ('K') | « background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld