aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorAlex Yatskov <FooSoft@users.noreply.github.com>2019-09-02 08:33:10 -0700
committerGitHub <noreply@github.com>2019-09-02 08:33:10 -0700
commit3c9f7ba15267f52dd1bf37cd8835e2f7b76819e7 (patch)
tree189f09ba4c2f8c57527a51dd29bf896079c832b6 /ext/bg/js
parent037363e3a70675a580431d2ee891e3d88fae511c (diff)
parent707d2569cc2c8c6da2bdacea6e999a7ea3ea6297 (diff)
Merge pull request #196 from toasted-nutbread/vertical-text-popup-position
Vertical text popup position
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js4
-rw-r--r--ext/bg/js/settings.js8
2 files changed, 12 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 29d8a215..c76525b9 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -199,6 +199,10 @@ function optionsSetDefaults(options) {
popupHeight: 250,
popupHorizontalOffset: 0,
popupVerticalOffset: 10,
+ popupHorizontalOffset2: 10,
+ popupVerticalOffset2: 0,
+ popupHorizontalTextPosition: 'below',
+ popupVerticalTextPosition: 'before',
showGuide: true,
compactTags: false,
compactGlossaries: false,
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index cdcdae77..c4eb4842 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -32,10 +32,14 @@ async function formRead() {
optionsNew.general.showAdvanced = $('#show-advanced-options').prop('checked');
optionsNew.general.maxResults = parseInt($('#max-displayed-results').val(), 10);
optionsNew.general.popupDisplayMode = $('#popup-display-mode').val();
+ optionsNew.general.popupHorizontalTextPosition = $('#popup-horizontal-text-position').val();
+ optionsNew.general.popupVerticalTextPosition = $('#popup-vertical-text-position').val();
optionsNew.general.popupWidth = parseInt($('#popup-width').val(), 10);
optionsNew.general.popupHeight = parseInt($('#popup-height').val(), 10);
optionsNew.general.popupHorizontalOffset = parseInt($('#popup-horizontal-offset').val(), 0);
optionsNew.general.popupVerticalOffset = parseInt($('#popup-vertical-offset').val(), 10);
+ optionsNew.general.popupHorizontalOffset2 = parseInt($('#popup-horizontal-offset2').val(), 0);
+ optionsNew.general.popupVerticalOffset2 = parseInt($('#popup-vertical-offset2').val(), 10);
optionsNew.general.customPopupCss = $('#custom-popup-css').val();
optionsNew.scanning.middleMouse = $('#middle-mouse-button-scan').prop('checked');
@@ -168,10 +172,14 @@ async function onReady() {
$('#show-advanced-options').prop('checked', options.general.showAdvanced);
$('#max-displayed-results').val(options.general.maxResults);
$('#popup-display-mode').val(options.general.popupDisplayMode);
+ $('#popup-horizontal-text-position').val(options.general.popupHorizontalTextPosition);
+ $('#popup-vertical-text-position').val(options.general.popupVerticalTextPosition);
$('#popup-width').val(options.general.popupWidth);
$('#popup-height').val(options.general.popupHeight);
$('#popup-horizontal-offset').val(options.general.popupHorizontalOffset);
$('#popup-vertical-offset').val(options.general.popupVerticalOffset);
+ $('#popup-horizontal-offset2').val(options.general.popupHorizontalOffset2);
+ $('#popup-vertical-offset2').val(options.general.popupVerticalOffset2);
$('#custom-popup-css').val(options.general.customPopupCss);
$('#middle-mouse-button-scan').prop('checked', options.scanning.middleMouse);