always disable scanning IME checkbox label

This commit is contained in:
siikamiika 2019-11-09 13:01:21 +02:00
parent cf0bb0a9e2
commit 40c8268fd6
3 changed files with 9 additions and 3 deletions

View File

@ -25,7 +25,10 @@ async function searchFrontendSetup() {
const options = await apiOptionsGet(optionsContext); const options = await apiOptionsGet(optionsContext);
if (!options.scanning.enableOnSearchPage) { return; } 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}; window.frontendInitializationData = {depth: 1, ignoreNodes, proxy: false};

View File

@ -27,7 +27,7 @@
<div class="input-group" style="padding-top: 10px; font-size: 20px; user-select: none;"> <div class="input-group" style="padding-top: 10px; font-size: 20px; user-select: none;">
<span title="Enable kana input method" class="input-group-text"> <span title="Enable kana input method" class="input-group-text">
<label> <label class="scan-disable">
<input type="checkbox" id="wanakana-enable" /> <input type="checkbox" id="wanakana-enable" />
</label> </label>

View File

@ -33,7 +33,10 @@ async function popupNestedInitialize(id, depth, parentFrameId, url) {
return; 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 = {id, depth, parentFrameId, ignoreNodes, url, proxy: true}; window.frontendInitializationData = {id, depth, parentFrameId, ignoreNodes, url, proxy: true};