diff options
Diffstat (limited to 'ext/bg/js')
| -rw-r--r-- | ext/bg/js/options.js | 1 | ||||
| -rw-r--r-- | ext/bg/js/settings/main.js | 6 | 
2 files changed, 5 insertions, 2 deletions
| diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index cf9af240..c2da76b1 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -281,6 +281,7 @@ function profileOptionsCreateDefaults() {              popupVerticalTextPosition: 'before',              popupScalingFactor: 1,              popupScaleRelativeToPageZoom: false, +            popupScaleRelativeToVisualViewport: true,              showGuide: true,              compactTags: false,              compactGlossaries: false, diff --git a/ext/bg/js/settings/main.js b/ext/bg/js/settings/main.js index a5407b75..ac255978 100644 --- a/ext/bg/js/settings/main.js +++ b/ext/bg/js/settings/main.js @@ -45,7 +45,8 @@ async function formRead(options) {      options.general.popupHorizontalOffset2 = parseInt($('#popup-horizontal-offset2').val(), 0);      options.general.popupVerticalOffset2 = parseInt($('#popup-vertical-offset2').val(), 10);      options.general.popupScalingFactor = parseInt($('#popup-scaling-factor').val(), 10); -    options.general.popupScaleRelativeToPageZoom = $('#popup-scale-relative-to-page-zoom').val() === 'true'; +    options.general.popupScaleRelativeToPageZoom = $('#popup-scale-relative-to-page-zoom').prop('checked'); +    options.general.popupScaleRelativeToVisualViewport = $('#popup-scale-relative-to-visual-viewport').prop('checked');      options.general.popupTheme = $('#popup-theme').val();      options.general.popupOuterTheme = $('#popup-outer-theme').val();      options.general.customPopupCss = $('#custom-popup-css').val(); @@ -112,7 +113,8 @@ async function formWrite(options) {      $('#popup-horizontal-offset2').val(options.general.popupHorizontalOffset2);      $('#popup-vertical-offset2').val(options.general.popupVerticalOffset2);      $('#popup-scaling-factor').val(options.general.popupScalingFactor); -    $('#popup-scale-relative-to-page-zoom').val(options.general.popupScaleRelativeToPageZoom ? 'true' : 'false'); +    $('#popup-scale-relative-to-page-zoom').prop('checked', options.general.popupScaleRelativeToPageZoom); +    $('#popup-scale-relative-to-visual-viewport').prop('checked', options.general.popupScaleRelativeToVisualViewport);      $('#popup-theme').val(options.general.popupTheme);      $('#popup-outer-theme').val(options.general.popupOuterTheme);      $('#custom-popup-css').val(options.general.customPopupCss); |