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

Side by Side Diff: lib/cssInjection.js

Issue 29685561: Issue 5864 - Specify CSS group name for standard filters (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Jan. 31, 2018, 8:31 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 selectors = ElemHide.getSelectorsForDomain( 129 selectors = ElemHide.getSelectorsForDomain(
130 hostname, 130 hostname,
131 specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.ALL_MATCHING 131 specificOnly ? ElemHide.SPECIFIC_ONLY : ElemHide.ALL_MATCHING
132 ); 132 );
133 133
134 for (let filter of ElemHideEmulation.getRulesForDomain(hostname)) 134 for (let filter of ElemHideEmulation.getRulesForDomain(hostname))
135 emulatedPatterns.push({selector: filter.selector, text: filter.text}); 135 emulatedPatterns.push({selector: filter.selector, text: filter.text});
136 } 136 }
137 137
138 if (!inline) 138 if (!inline)
139 updateFrameStyles(sender.page.id, sender.frame.id, selectors); 139 updateFrameStyles(sender.page.id, sender.frame.id, selectors, "standard");
140 140
141 let response = {trace, inline, emulatedPatterns}; 141 let response = {trace, inline, emulatedPatterns};
142 if (trace || inline) 142 if (trace || inline)
143 response.selectors = selectors; 143 response.selectors = selectors;
144 144
145 return response; 145 return response;
146 }); 146 });
147 147
148 port.on("elemhide.injectSelectors", (message, sender) => 148 port.on("elemhide.injectSelectors", (message, sender) =>
149 { 149 {
150 updateFrameStyles(sender.page.id, sender.frame.id, message.selectors, 150 updateFrameStyles(sender.page.id, sender.frame.id, message.selectors,
151 message.groupName); 151 message.groupName);
152 }); 152 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld