summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-13 11:51:59 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-10-13 12:12:52 -0400
commit42d67249c9d912cbb39700f55bb33051f69055c7 (patch)
treedb774794892db9569e8193181cc027b45ffa23cf /ext/bg/js/settings.js
parentc9158a37b509ba58cd1e364e3d7a31cd43de5789 (diff)
Update the popup preview to show live updates to outer CSS changes
Diffstat (limited to 'ext/bg/js/settings.js')
-rw-r--r--ext/bg/js/settings.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/bg/js/settings.js b/ext/bg/js/settings.js
index 7eee7bce..77815955 100644
--- a/ext/bg/js/settings.js
+++ b/ext/bg/js/settings.js
@@ -285,6 +285,7 @@ function showAppearancePreview() {
const settings = $('#settings-popup-preview-settings');
const text = $('#settings-popup-preview-text');
const customCss = $('#custom-popup-css');
+ const customOuterCss = $('#custom-popup-outer-css');
const frame = document.createElement('iframe');
frame.src = '/bg/settings-popup-preview.html';
@@ -302,6 +303,11 @@ function showAppearancePreview() {
const params = {css: customCss.val()};
frame.contentWindow.postMessage({action, params}, '*');
});
+ customOuterCss.on('input', () => {
+ const action = 'setCustomOuterCss';
+ const params = {css: customOuterCss.val()};
+ frame.contentWindow.postMessage({action, params}, '*');
+ });
container.append(frame);
buttonContainer.remove();