diff options
-rw-r--r-- | ext/bg/data/options-schema.json | 28 | ||||
-rw-r--r-- | ext/bg/js/options.js | 4 | ||||
-rw-r--r-- | ext/bg/js/settings/scan-inputs-controller.js | 4 | ||||
-rw-r--r-- | ext/mixed/js/text-scanner.js | 20 | ||||
-rw-r--r-- | test/test-options-util.js | 12 |
5 files changed, 42 insertions, 26 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json index 0b0a9259..0a384766 100644 --- a/ext/bg/data/options-schema.json +++ b/ext/bg/data/options-schema.json @@ -352,12 +352,12 @@ }, "options": { "showAdvanced": false, + "searchTerms": true, + "searchKanji": true, "scanOnTouchMove": true, "scanOnPenHover": true, "scanOnPenPress": true, "scanOnPenRelease": false, - "searchTerms": true, - "searchKanji": true, "preventTouchScrolling": false } }, @@ -371,12 +371,12 @@ }, "options": { "showAdvanced": false, + "searchTerms": true, + "searchKanji": true, "scanOnTouchMove": true, "scanOnPenHover": true, "scanOnPenPress": true, "scanOnPenRelease": false, - "searchTerms": true, - "searchKanji": true, "preventTouchScrolling": true } } @@ -423,12 +423,12 @@ "type": "object", "required": [ "showAdvanced", + "searchTerms", + "searchKanji", "scanOnTouchMove", "scanOnPenHover", "scanOnPenPress", "scanOnPenRelease", - "searchTerms", - "searchKanji", "preventTouchScrolling" ], "properties": { @@ -436,29 +436,29 @@ "type": "boolean", "default": false }, - "scanOnTouchMove": { + "searchTerms": { "type": "boolean", "default": true }, - "scanOnPenHover": { + "searchKanji": { "type": "boolean", "default": true }, - "scanOnPenPress": { + "scanOnTouchMove": { "type": "boolean", "default": true }, - "scanOnPenRelease": { + "scanOnPenHover": { "type": "boolean", - "default": false + "default": true }, - "searchTerms": { + "scanOnPenPress": { "type": "boolean", "default": true }, - "searchKanji": { + "scanOnPenRelease": { "type": "boolean", - "default": true + "default": false }, "preventTouchScrolling": { "type": "boolean", diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index f83dad6d..19a5cc2c 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -522,12 +522,12 @@ class OptionsUtil { } const createInputDefaultOptions = () => ({ showAdvanced: false, + searchTerms: true, + searchKanji: true, scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, - searchTerms: true, - searchKanji: true, preventTouchScrolling: true }); for (const {options: profileOptions} of options.profiles) { diff --git a/ext/bg/js/settings/scan-inputs-controller.js b/ext/bg/js/settings/scan-inputs-controller.js index 5da0d5e1..ec2758cb 100644 --- a/ext/bg/js/settings/scan-inputs-controller.js +++ b/ext/bg/js/settings/scan-inputs-controller.js @@ -99,12 +99,12 @@ class ScanInputsController { types: {mouse: true, touch: false, pen: false}, options: { showAdvanced: false, + searchTerms: true, + searchKanji: true, scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, - searchTerms: true, - searchKanji: true, preventTouchScrolling: true } }] diff --git a/ext/mixed/js/text-scanner.js b/ext/mixed/js/text-scanner.js index fe20cb1c..d8bdd653 100644 --- a/ext/mixed/js/text-scanner.js +++ b/ext/mixed/js/text-scanner.js @@ -120,12 +120,28 @@ class TextScanner extends EventDispatcher { include, exclude, types, - options: {scanOnTouchMove, scanOnPenHover, scanOnPenPress, scanOnPenRelease, searchTerms, searchKanji, preventTouchScrolling} + options: { + searchTerms, + searchKanji, + scanOnTouchMove, + scanOnPenHover, + scanOnPenPress, + scanOnPenRelease, + preventTouchScrolling + } }) => ({ include: this._getInputArray(include), exclude: this._getInputArray(exclude), types: this._getInputTypeSet(types), - options: {scanOnTouchMove, scanOnPenHover, scanOnPenPress, scanOnPenRelease, searchTerms, searchKanji, preventTouchScrolling} + options: { + searchTerms, + searchKanji, + scanOnTouchMove, + scanOnPenHover, + scanOnPenPress, + scanOnPenRelease, + preventTouchScrolling + } })); } if (typeof deepContentScan === 'boolean') { diff --git a/test/test-options-util.js b/test/test-options-util.js index c8eb3b16..a7dc41d1 100644 --- a/test/test-options-util.js +++ b/test/test-options-util.js @@ -333,12 +333,12 @@ function createProfileOptionsUpdatedTestData1() { }, options: { showAdvanced: false, + searchTerms: true, + searchKanji: true, scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, - searchTerms: true, - searchKanji: true, preventTouchScrolling: true } }, @@ -352,12 +352,12 @@ function createProfileOptionsUpdatedTestData1() { }, options: { showAdvanced: false, + searchTerms: true, + searchKanji: true, scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, - searchTerms: true, - searchKanji: true, preventTouchScrolling: true } }, @@ -371,12 +371,12 @@ function createProfileOptionsUpdatedTestData1() { }, options: { showAdvanced: false, + searchTerms: true, + searchKanji: true, scanOnTouchMove: true, scanOnPenHover: true, scanOnPenPress: true, scanOnPenRelease: false, - searchTerms: true, - searchKanji: true, preventTouchScrolling: true } } |