From 8766744aa4a94193dd03bba39086e4522914e8ef Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 16 Jan 2021 10:22:24 -0500 Subject: 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 --- ext/bg/js/options.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ext/bg/js/options.js') 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; } -- cgit v1.2.3