diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-10-12 13:48:23 -0400 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-10-12 15:44:35 -0400 |
commit | 696ea80e0681c9dab71e7b253acf4c87155004ba (patch) | |
tree | 4afe98e30a738bfd8e3717be958a5d7a9127d48d | |
parent | be7fa57d5ced7f6969c5d66f0a35fafb9de3bcee (diff) |
Add option for popup theme
-rw-r--r-- | ext/bg/js/options.js | 1 | ||||
-rw-r--r-- | ext/bg/js/settings.js | 2 | ||||
-rw-r--r-- | ext/bg/settings.html | 8 |
3 files changed, 11 insertions, 0 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js index 1021e18d..088945c0 100644 --- a/ext/bg/js/options.js +++ b/ext/bg/js/options.js @@ -276,6 +276,7 @@ function profileOptionsCreateDefaults() { compactTags: false, compactGlossaries: false, mainDictionary: '', + popupTheme: 'default', customPopupCss: '' }, diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js index 5732b8ae..f09b35d9 100644 --- a/ext/bg/js/settings.js +++ b/ext/bg/js/settings.js @@ -39,6 +39,7 @@ async function formRead(options) { options.general.popupVerticalOffset = parseInt($('#popup-vertical-offset').val(), 10); options.general.popupHorizontalOffset2 = parseInt($('#popup-horizontal-offset2').val(), 0); options.general.popupVerticalOffset2 = parseInt($('#popup-vertical-offset2').val(), 10); + options.general.popupTheme = $('#popup-theme').val(); options.general.customPopupCss = $('#custom-popup-css').val(); options.audio.enabled = $('#audio-playback-enabled').prop('checked'); @@ -107,6 +108,7 @@ async function formWrite(options) { $('#popup-vertical-offset').val(options.general.popupVerticalOffset); $('#popup-horizontal-offset2').val(options.general.popupHorizontalOffset2); $('#popup-vertical-offset2').val(options.general.popupVerticalOffset2); + $('#popup-theme').val(options.general.popupTheme); $('#custom-popup-css').val(options.general.customPopupCss); $('#audio-playback-enabled').prop('checked', options.audio.enabled); diff --git a/ext/bg/settings.html b/ext/bg/settings.html index 9dd71490..531c0e86 100644 --- a/ext/bg/settings.html +++ b/ext/bg/settings.html @@ -231,6 +231,14 @@ </div> </div> + <div class="form-group"> + <label for="popup-theme">Theme</label> + <select class="form-control" id="popup-theme"> + <option value="default">Light</option> + <option value="dark">Dark</option> + </select> + </div> + <div class="form-group options-advanced"> <label for="custom-popup-css">Custom popup CSS</label> <div><textarea autocomplete="off" spellcheck="false" wrap="soft" id="custom-popup-css" class="form-control"></textarea></div> |