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

Unified Diff: background.js

Issue 6174977720057856: Issue 1853 - Moved filter generation into background page (Closed)
Patch Set: Created Jan. 25, 2015, 1:21 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 | « no previous file | include.postload.js » ('j') | include.postload.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -50,6 +50,7 @@
var NotificationStorage = require("notification").Notification;
var initAntiAdblockNotification = require("antiadblockInit").initAntiAdblockNotification;
var parseFilters = require("filterValidation").parseFilters;
+var composeFilters = require("filterComposer").composeFilters;
// Some types cannot be distinguished
RegExpFilter.typeMap.OBJECT_SUBREQUEST = RegExpFilter.typeMap.OBJECT;
@@ -562,6 +563,12 @@
htmlPages.set(sender.page, null);
refreshIconAndContextMenu(sender.page);
break;
+ case "compose-filters":
+ sendResponse(composeFilters(
+ msg.tagName, msg.id, msg.src, msg.style,
+ msg.classes, msg.urls, new URL(msg.baseURL)
+ ));
+ break;
case "forward":
if (sender.page)
{
« no previous file with comments | « no previous file | include.postload.js » ('j') | include.postload.js » ('J')

Powered by Google App Engine
This is Rietveld