aboutsummaryrefslogtreecommitdiff
path: root/ext/js/pages/settings/popup-preview-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-03 13:32:53 -0400
committerGitHub <noreply@github.com>2021-04-03 13:32:53 -0400
commit0e26d9a667e2794346c8969a24d389eb45208df1 (patch)
tree815bd07d8216c1b9b88c8f7d6f341ab5259b6fd1 /ext/js/pages/settings/popup-preview-controller.js
parenta9fe2d03b22a0dd5760019f1325a7a86ebb07b85 (diff)
Remove code for old settings page (#1588)
Diffstat (limited to 'ext/js/pages/settings/popup-preview-controller.js')
-rw-r--r--ext/js/pages/settings/popup-preview-controller.js27
1 files changed, 11 insertions, 16 deletions
diff --git a/ext/js/pages/settings/popup-preview-controller.js b/ext/js/pages/settings/popup-preview-controller.js
index f98b0679..b2ffbb3a 100644
--- a/ext/js/pages/settings/popup-preview-controller.js
+++ b/ext/js/pages/settings/popup-preview-controller.js
@@ -32,22 +32,17 @@ class PopupPreviewController {
}
async prepare() {
- const button = document.querySelector('#settings-popup-preview-button');
- if (button !== null) {
- button.addEventListener('click', this._onShowPopupPreviewButtonClick.bind(this), false);
- } else {
- this._frame = document.querySelector('#popup-preview-frame');
- this._customCss = document.querySelector('#custom-popup-css');
- this._customOuterCss = document.querySelector('#custom-popup-outer-css');
- this._previewFrameContainer = document.querySelector('.preview-frame-container');
-
- this._customCss.addEventListener('input', this._onCustomCssChange.bind(this), false);
- this._customCss.addEventListener('settingChanged', this._onCustomCssChange.bind(this), false);
- this._customOuterCss.addEventListener('input', this._onCustomOuterCssChange.bind(this), false);
- this._customOuterCss.addEventListener('settingChanged', this._onCustomOuterCssChange.bind(this), false);
- this._frame.addEventListener('load', this._onFrameLoad2.bind(this), false);
- this._settingsController.on('optionsContextChanged', this._onOptionsContextChange.bind(this));
- }
+ this._frame = document.querySelector('#popup-preview-frame');
+ this._customCss = document.querySelector('#custom-popup-css');
+ this._customOuterCss = document.querySelector('#custom-popup-outer-css');
+ this._previewFrameContainer = document.querySelector('.preview-frame-container');
+
+ this._customCss.addEventListener('input', this._onCustomCssChange.bind(this), false);
+ this._customCss.addEventListener('settingChanged', this._onCustomCssChange.bind(this), false);
+ this._customOuterCss.addEventListener('input', this._onCustomOuterCssChange.bind(this), false);
+ this._customOuterCss.addEventListener('settingChanged', this._onCustomOuterCssChange.bind(this), false);
+ this._frame.addEventListener('load', this._onFrameLoad2.bind(this), false);
+ this._settingsController.on('optionsContextChanged', this._onOptionsContextChange.bind(this));
}
// Private