diff options
Diffstat (limited to 'ext/bg')
-rw-r--r-- | ext/bg/data/options-schema.json | 28 | ||||
-rw-r--r-- | ext/bg/js/options.js | 7 | ||||
-rw-r--r-- | ext/bg/settings.html | 10 |
3 files changed, 45 insertions, 0 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json index 2e324984..80f8d782 100644 --- a/ext/bg/data/options-schema.json +++ b/ext/bg/data/options-schema.json @@ -320,6 +320,7 @@ "type": "object", "required": [ "inputs", + "preventMiddleMouse", "touchInputEnabled", "pointerEventsEnabled", "selectText", @@ -454,6 +455,33 @@ } } }, + "preventMiddleMouse": { + "type": "object", + "required": [ + "onWebPages", + "onPopupPages", + "onSearchPages", + "onSearchQuery" + ], + "properties": { + "onWebPages": { + "type": "boolean", + "default": false + }, + "onPopupPages": { + "type": "boolean", + "default": false + }, + "onSearchPages": { + "type": "boolean", + "default": false + }, + "onSearchQuery": { + "type": "boolean", + "default": false + } + } + }, "touchInputEnabled": { "type": "boolean", "default": true diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index f9571ec2..cf24645a 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -507,6 +507,7 @@ class OptionsUtil { // Added hideDelay. // Added inputs to profileOptions.scanning. // Added pointerEventsEnabled to profileOptions.scanning. + // Added preventMiddleMouse to profileOptions.scanning. for (const {conditionGroups} of options.profiles) { for (const {conditions} of conditionGroups) { for (const condition of conditions) { @@ -531,6 +532,12 @@ class OptionsUtil { profileOptions.general.usePopupWindow = false; profileOptions.scanning.hideDelay = 0; profileOptions.scanning.pointerEventsEnabled = false; + profileOptions.scanning.preventMiddleMouse = { + onWebPages: false, + onPopupPages: false, + onSearchPages: false, + onSearchQuery: false + }; const {modifier, middleMouse} = profileOptions.scanning; delete profileOptions.scanning.modifier; diff --git a/ext/bg/settings.html b/ext/bg/settings.html index 9c8621f7..8dea0245 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -414,6 +414,16 @@ <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.deepDomScan"> Deep content scan</label> </div> + <div class="checkbox options-advanced"> + <strong>Prevent middle mouse button actions on:</strong> + <div style="margin-left: 1em;"> + <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.preventMiddleMouse.onWebPages"> Webpages</label><br> + <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.preventMiddleMouse.onPopupPages"> Popups</label><br> + <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.preventMiddleMouse.onSearchPages"> Search page</label><br> + <label><input type="checkbox" id="deep-dom-scan" data-setting="scanning.preventMiddleMouse.onSearchQuery"> Search query</label><br> + </div> + </div> + <div class="form-group options-advanced"> <div class="row"> <div class="col-xs-6"> |