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: Rebased and fixed documentation mistakenly indicating arguments as optional Created Feb. 28, 2015, 5:59 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') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: background.js
===================================================================
--- a/background.js
+++ b/background.js
@@ -55,6 +55,7 @@
var NotificationStorage = require("notification").Notification;
var initAntiAdblockNotification = require("antiadblockInit").initAntiAdblockNotification;
var parseFilters = require("filterValidation").parseFilters;
+var composeFilters = require("filterComposer").composeFilters;
// Chrome on Linux does not fully support chrome.notifications until version 35
// https://code.google.com/p/chromium/issues/detail?id=291485
@@ -551,6 +552,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld