From 3d867baf0b844cb1d411f5dacbec3c1b95108d3c Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Tue, 21 Aug 2018 07:07:14 -0400 Subject: [PATCH] fix https://github.com/NanoMeow/QuickReports/issues/6#issuecomment-414516623 --- src/js/ublock.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/js/ublock.js b/src/js/ublock.js index d3d6349c5..728d5c668 100644 --- a/src/js/ublock.js +++ b/src/js/ublock.js @@ -515,11 +515,17 @@ var matchBucket = function(url, hostname, bucket, start) { /******************************************************************************/ +// https://github.com/NanoMeow/QuickReports/issues/6#issuecomment-414516623 +// Inject as early as possible to make the cosmetic logger code less +// sensitive to the removal of DOM nodes which may match injected +// cosmetic filters. + µBlock.logCosmeticFilters = function(tabId, frameId) { if ( this.logger.isEnabled() ) { vAPI.tabs.injectScript(tabId, { file: '/js/scriptlets/cosmetic-logger.js', - frameId: frameId + frameId: frameId, + runAt: 'document_start' }); } };