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

Unified Diff: lib/filterComposer.js

Issue 4734012065054720: Issue 2634 - Consider alternative URLs for element collapsing (Closed)
Patch Set: Consider all URLs for element collapsing Created June 7, 2015, 3:14 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
« no previous file with comments | « include.preload.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -95,24 +95,20 @@
for (let url of details.urls)
{
let urlObj = new URL(url, details.baseURL);
+ url = stringifyURL(urlObj);
- if (urlObj.protocol == "http:" || urlObj.protocol == "https:")
+ let filter = defaultMatcher.whitelist.matchesAny(
+ url, details.type, docDomain,
+ isThirdParty(urlObj, docDomain),
+ getKey(page, frame)
+ );
+
+ if (!filter)
{
- url = stringifyURL(urlObj);
+ let filterText = url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||");
- let filter = defaultMatcher.whitelist.matchesAny(
- url, details.type, docDomain,
- isThirdParty(urlObj, docDomain),
- getKey(page, frame)
- );
-
- if (!filter)
- {
- let filterText = url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||");
-
- if (filters.indexOf(filterText) == -1)
- filters.push(filterText);
- }
+ if (filters.indexOf(filterText) == -1)
+ filters.push(filterText);
}
}
« no previous file with comments | « include.preload.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld