aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-01-16 10:22:24 -0500
committerGitHub <noreply@github.com>2021-01-16 10:22:24 -0500
commit8766744aa4a94193dd03bba39086e4522914e8ef (patch)
treebfb4a15e264c1fa4f9740bbd763a255e164a51e1 /ext/bg/js/options.js
parentdc4d659184a61a55083e201438bff7732acece1b (diff)
Popup window options (#1245)
* Add popupWindow options * Add toBoolean converter * Add settings * Use new options * Add test link * Fix window state not working * Make the window section advanced only
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 964c346c..026d75c5 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -689,6 +689,7 @@ class OptionsUtil {
// Changed general.popupActionBarLocation.
// Added inputs.hotkeys.
// Added anki.suspendNewCards.
+ // Added popupWindow.
for (const profile of options.profiles) {
profile.options.translation.textReplacements = {
searchOriginal: true,
@@ -735,6 +736,16 @@ class OptionsUtil {
]
};
profile.options.anki.suspendNewCards = false;
+ profile.options.popupWindow = {
+ width: profile.options.general.popupWidth,
+ height: profile.options.general.popupHeight,
+ left: 0,
+ top: 0,
+ useLeft: false,
+ useTop: false,
+ windowType: 'popup',
+ windowState: 'normal'
+ };
}
return options;
}