summaryrefslogtreecommitdiff
path: root/ext/bg
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg')
-rw-r--r--ext/bg/data/options-schema.json7
-rw-r--r--ext/bg/js/options.js4
-rw-r--r--ext/bg/settings.html4
3 files changed, 14 insertions, 1 deletions
diff --git a/ext/bg/data/options-schema.json b/ext/bg/data/options-schema.json
index b56017bc..e2dd0573 100644
--- a/ext/bg/data/options-schema.json
+++ b/ext/bg/data/options-schema.json
@@ -111,7 +111,8 @@
"showPitchAccentGraph",
"showIframePopupsInRootFrame",
"useSecurePopupFrameUrl",
- "usePopupShadowDom"
+ "usePopupShadowDom",
+ "usePopupWindow"
],
"properties": {
"enable": {
@@ -257,6 +258,10 @@
"usePopupShadowDom": {
"type": "boolean",
"default": true
+ },
+ "usePopupWindow": {
+ "type": "boolean",
+ "default": false
}
}
},
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index c513f572..1cabf2cf 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -467,6 +467,7 @@ class OptionsUtil {
static _updateVersion4(options) {
// Version 4 changes:
// Options conditions converted to string representations.
+ // Added usePopupWindow.
for (const {conditionGroups} of options.profiles) {
for (const {conditions} of conditionGroups) {
for (const condition of conditions) {
@@ -479,6 +480,9 @@ class OptionsUtil {
}
}
}
+ for (const {options: profileOptions} of options.profiles) {
+ profileOptions.general.usePopupWindow = false;
+ }
return options;
}
}
diff --git a/ext/bg/settings.html b/ext/bg/settings.html
index 878ea02d..a999a9d9 100644
--- a/ext/bg/settings.html
+++ b/ext/bg/settings.html
@@ -181,6 +181,10 @@
</div>
<div class="checkbox options-advanced">
+ <label><input type="checkbox" data-setting="general.usePopupWindow"> Use a native popup window when scanning text on web pages</label>
+ </div>
+
+ <div class="checkbox options-advanced">
<label><input type="checkbox" data-setting="general.useSecurePopupFrameUrl"> Use secure popup frame URL</label>
</div>