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

Unified Diff: webrequest.js

Issue 6228201961422848: Issue 2064 - Configure indistinguishable request types in the abstraction layer (Closed)
Patch Set: Ignore MEDIA and FONT filters on Chrome Created March 2, 2015, 7:22 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 | « safari/ext/content.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
@@ -16,6 +16,7 @@
*/
var FilterNotifier = require("filterNotifier").FilterNotifier;
+var RegExpFilter = require("filterClasses").RegExpFilter;
var platform = require("info").platform;
var onFilterChangeTimeout = null;
@@ -36,6 +37,12 @@
'load': true
};
+ext.webRequest.indistinguishableTypes.forEach(function(types)
+{
+ for (var i = 1; i < types.length; i++)
+ RegExpFilter.typeMap[types[i]] = RegExpFilter.typeMap[types[0]];
+});
+
FilterNotifier.addListener(function(action)
{
if (action in importantNotifications)
« no previous file with comments | « safari/ext/content.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld