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

Unified Diff: composer.postload.js

Issue 29737561: Issue 6539, 6782 - Implement support for snippets (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Rename lib/scriptInjection.js to lib/contentFiltering.js Created July 19, 2018, 1:56 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.preload.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: composer.postload.js
===================================================================
--- a/composer.postload.js
+++ b/composer.postload.js
@@ -15,17 +15,17 @@
* along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
*/
"use strict";
// We would rather export these properly and then require("./include.preload")
// here, but that would result in include.preload running both at pre and post
// load.
-const {checkCollapse, elemhide, getURLsFromElement, typeMap} = window;
+const {checkCollapse, contentFiltering, getURLsFromElement, typeMap} = window;
// The page ID for the popup filter selection dialog (top frame only).
let blockelementPopupId = null;
// Element picking state (top frame only).
let currentlyPickingElement = false;
let lastMouseOverEvent = null;
@@ -538,17 +538,17 @@
// Hide the selected element itself if an added blocking
// filter is causing it to collapse. Note that this
// behavior is incomplete, but the best we can do here,
// e.g. if an added blocking filter matches other elements,
// the effect won't be visible until the page is is reloaded.
checkCollapse(currentElement.prisoner || currentElement);
// Apply added element hiding filters.
- elemhide.apply();
+ contentFiltering.apply({elemhide: true});
}
deactivateBlockElement(!!message.popupAlreadyClosed);
break;
case "composer.content.clearPreviousRightClickEvent":
if (!lastRightClickEventIsMostRecent)
lastRightClickEvent = null;
lastRightClickEventIsMostRecent = false;
break;
« no previous file with comments | « no previous file | include.preload.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld