summaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/options.js6
-rw-r--r--ext/bg/js/util.js5
2 files changed, 10 insertions, 1 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index 3b10b74f..a094f73f 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -30,6 +30,9 @@ function formRead() {
optionsNew.general.softKatakana = $('#soft-katakana-search').prop('checked');
optionsNew.general.showAdvanced = $('#show-advanced-options').prop('checked');
optionsNew.general.maxResults = parseInt($('#max-displayed-results').val(), 10);
+ optionsNew.general.popupWidth = parseInt($('#popup-width').val(), 10);
+ optionsNew.general.popupHeight = parseInt($('#popup-height').val(), 10);
+ optionsNew.general.popupOffset = parseInt($('#popup-offset').val(), 10);
optionsNew.scanning.requireShift = $('#hold-shift-to-scan').prop('checked');
optionsNew.scanning.middleMouse = $('#middle-mouse-button-scan').prop('checked');
@@ -112,6 +115,9 @@ $(document).ready(() => {
$('#soft-katakana-search').prop('checked', options.general.softKatakana);
$('#show-advanced-options').prop('checked', options.general.showAdvanced);
$('#max-displayed-results').val(options.general.maxResults);
+ $('#popup-width').val(options.general.popupWidth);
+ $('#popup-height').val(options.general.popupHeight);
+ $('#popup-offset').val(options.general.popupOffset);
$('#hold-shift-to-scan').prop('checked', options.scanning.requireShift);
$('#middle-mouse-button-scan').prop('checked', options.scanning.middleMouse);
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 7f031040..f9b221b3 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -79,7 +79,10 @@ function optionsSetDefaults(options) {
groupResults: true,
softKatakana: true,
maxResults: 32,
- showAdvanced: false
+ showAdvanced: false,
+ popupWidth: 400,
+ popupHeight: 250,
+ popupOffset: 10
},
scanning: {