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

Unified Diff: webrequest.js

Issue 8741005: Topic 11337 - More reliable approach to hide image/frame placeholders (Closed)
Patch Set: Created Oct. 31, 2012, 9:14 a.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') | « include.preload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrequest.js
===================================================================
--- a/webrequest.js
+++ b/webrequest.js
@@ -170,35 +170,17 @@ function checkRequest(type, tabId, url,
var documentUrl = getFrameUrl(tabId, frameId);
if (!documentUrl)
return false;
var requestHost = extractHostFromURL(url);
var documentHost = extractHostFromURL(documentUrl);
var thirdParty = isThirdParty(requestHost, documentHost);
- var filter = defaultMatcher.matchesAny(url, type, documentHost, thirdParty);
-
- if (filter instanceof BlockingFilter)
- {
- var collapse = filter.collapse;
- if (collapse == null)
- collapse = (localStorage["hidePlaceholders"] != "false");
- if (collapse && (type == "SUBDOCUMENT" || type == "IMAGE"))
- {
- chrome.tabs.sendMessage(tabId, {
- reqtype: "hide-element",
- type: type,
- url: url,
- documentUrl: documentUrl
- });
- }
- }
-
- return filter;
+ return defaultMatcher.matchesAny(url, type, documentHost, thirdParty);
}
function isFrameWhitelisted(tabId, frameId, type)
{
var parent = frameId;
while (parent != -1)
{
var parentData = getFrameData(tabId, parent);
« background.js ('K') | « include.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld