From dd5a93d47722da30c8d89854d36c132164b2929a Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Thu, 31 Mar 2022 11:50:45 -0400 Subject: [PATCH] Fix scriptlets not being reported in logger (Firefox) Regression from: - https://github.com/gorhill/uBlock/commit/efe2e0c78a25e71eea616035384c185c453378c0 Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/2072 --- src/js/messaging.js | 2 +- src/js/scriptlet-filtering.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/messaging.js b/src/js/messaging.js index f5bc636ec..6feb12c7c 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -658,7 +658,7 @@ const retrieveContentScriptParameters = async function(sender, request) { µb.canInjectScriptletsNow === false || isNetworkURI(sender.frameURL) === false ) { - response.scriptlets = scriptletFilteringEngine.retrieve(request); + scriptletFilteringEngine.injectNow(request); } // https://github.com/NanoMeow/QuickReports/issues/6#issuecomment-414516623 diff --git a/src/js/scriptlet-filtering.js b/src/js/scriptlet-filtering.js index d0f7c8a16..ebeea7e9b 100644 --- a/src/js/scriptlet-filtering.js +++ b/src/js/scriptlet-filtering.js @@ -118,7 +118,7 @@ const contentscriptCode = (( ) => { '"', 'hostname-slot', '", ', '"', 'scriptlets-slot', '"', ');', - '0;', + '\n0;', ]; return { parts: parts,