From 25af532ab7750a456f46b37825d8dbe876363d19 Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sat, 9 Nov 2019 12:27:09 +0200 Subject: enable expression scan toggling on search page --- ext/bg/js/search-frontend.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ext/bg/js/search-frontend.js') diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js index b21dac17..63ed0724 100644 --- a/ext/bg/js/search-frontend.js +++ b/ext/bg/js/search-frontend.js @@ -25,7 +25,9 @@ async function searchFrontendSetup() { const options = await apiOptionsGet(optionsContext); if (!options.scanning.enableOnSearchPage) { return; } - window.frontendInitializationData = {depth: 1, proxy: false}; + const ignoreNodes = options.scanning.enableOnPopupExpressions ? [] : ['.expression-scan-toggle', '.expression-scan-toggle *']; + + window.frontendInitializationData = {depth: 1, ignoreNodes, proxy: false}; const scriptSrcs = [ '/fg/js/frontend-api-receiver.js', -- cgit v1.2.3 From 40c8268fd6b32c9918fbebd374723cd17f2e19aa Mon Sep 17 00:00:00 2001 From: siikamiika Date: Sat, 9 Nov 2019 13:01:21 +0200 Subject: always disable scanning IME checkbox label --- ext/bg/js/search-frontend.js | 5 ++++- ext/bg/search.html | 2 +- ext/fg/js/popup-nested.js | 5 ++++- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'ext/bg/js/search-frontend.js') diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-frontend.js index 63ed0724..6ba8467e 100644 --- a/ext/bg/js/search-frontend.js +++ b/ext/bg/js/search-frontend.js @@ -25,7 +25,10 @@ async function searchFrontendSetup() { const options = await apiOptionsGet(optionsContext); if (!options.scanning.enableOnSearchPage) { return; } - const ignoreNodes = options.scanning.enableOnPopupExpressions ? [] : ['.expression-scan-toggle', '.expression-scan-toggle *']; + const ignoreNodes = ['.scan-disable', '.scan-disable *']; + if (!options.scanning.enableOnPopupExpressions) { + ignoreNodes.push('.expression-scan-toggle', '.expression-scan-toggle *'); + } window.frontendInitializationData = {depth: 1, ignoreNodes, proxy: false}; diff --git a/ext/bg/search.html b/ext/bg/search.html index 91140b95..c7f97712 100644 --- a/ext/bg/search.html +++ b/ext/bg/search.html @@ -27,7 +27,7 @@
-