aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-09-26 19:24:21 -0400
committerGitHub <noreply@github.com>2020-09-26 19:24:21 -0400
commit73dd578821d1373d4504778318e2e2f26b79a80e (patch)
tree7b96fd5bfef81de55175fc5a97ddee11cbb2ed1b /ext/bg/js/options.js
parent9c7b9d666087add0f72900c045ee43ed05c5b467 (diff)
Add middle mouse prevention option (#868)
* Add preventMiddleMouse option to TextScanner * Add preventMiddleMouse options * Add options * Apply preventMiddleMouse options
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js7
1 files changed, 7 insertions, 0 deletions
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;