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

Unified Diff: messageResponder.js

Issue 29555936: Issue 5781 - Remove message responder code for emulated element hiding filters (Closed)
Patch Set: Created Sept. 25, 2017, 11:10 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 | « background.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: messageResponder.js
===================================================================
--- a/messageResponder.js
+++ b/messageResponder.js
@@ -29,7 +29,6 @@
const {FilterStorage} = require("filterStorage");
const {FilterNotifier} = require("filterNotifier");
const {defaultMatcher} = require("matcher");
- const {ElemHideEmulation} = require("elemHideEmulation");
const {Notification: NotificationStorage} = require("notification");
const {Filter, BlockingFilter, RegExpFilter} = require("filterClasses");
@@ -226,28 +225,6 @@
port.on("filters.get", (message, sender) =>
{
- if (message.what == "elemhideemulation")
- {
- let filters = [];
- const {checkWhitelisted} = require("whitelisting");
-
- let isWhitelisted = checkWhitelisted(sender.page, sender.frame,
- RegExpFilter.typeMap.DOCUMENT | RegExpFilter.typeMap.ELEMHIDE);
- if (Prefs.enabled && !isWhitelisted)
- {
- let {hostname} = sender.frame.url;
- filters = ElemHideEmulation.getRulesForDomain(hostname);
- filters = filters.map((filter) =>
- {
- return {
- selector: filter.selector,
- text: filter.text
- };
- });
- }
- return filters;
- }
-
let subscription = Subscription.fromURL(message.subscriptionUrl);
if (!subscription)
return [];
« no previous file with comments | « background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld