diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-12-20 22:16:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-20 22:16:38 -0500 |
commit | abc017545c6fce1c4b754a560f19d3ccaaf82eca (patch) | |
tree | 6459d86296ac5b8f452988873804138ea23da424 /ext/bg/js/settings/popup-preview-controller.js | |
parent | abfe066d7ee97e83c3ffa1cac3eb3eb75a0ea856 (diff) |
Update the popup preview to always be visible on the settings v2 page (#1151)
Diffstat (limited to 'ext/bg/js/settings/popup-preview-controller.js')
-rw-r--r-- | ext/bg/js/settings/popup-preview-controller.js | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/ext/bg/js/settings/popup-preview-controller.js b/ext/bg/js/settings/popup-preview-controller.js index 9dc29524..b5e347d0 100644 --- a/ext/bg/js/settings/popup-preview-controller.js +++ b/ext/bg/js/settings/popup-preview-controller.js @@ -29,7 +29,6 @@ class PopupPreviewController { this._customCss = null; this._customOuterCss = null; this._previewFrameContainer = null; - this._showPopupPreviewCheckbox = null; } async prepare() { @@ -41,19 +40,13 @@ class PopupPreviewController { this._customCss = document.querySelector('#custom-popup-css'); this._customOuterCss = document.querySelector('#custom-popup-outer-css'); this._previewFrameContainer = document.querySelector('.preview-frame-container'); - this._showPopupPreviewCheckbox = document.querySelector('#show-preview-checkbox'); 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._showPopupPreviewCheckbox.addEventListener('change', this._onShowPreviewCheckboxChange.bind(this), false); this._settingsController.on('optionsContextChanged', this._onOptionsContextChange.bind(this)); - - const {global: {showPopupPreview}} = await this._settingsController.getOptionsFull(); - this._showPopupPreviewCheckbox.checked = showPopupPreview; - this._updatePopupPreviewVisibility(); } } @@ -65,10 +58,6 @@ class PopupPreviewController { this._previewVisible = true; } - _onShowPreviewCheckboxChange() { - this._updatePopupPreviewVisibility(); - } - _showAppearancePreview() { const container = document.querySelector('#settings-popup-preview-container'); const buttonContainer = document.querySelector('#settings-popup-preview-button-container'); @@ -137,10 +126,4 @@ class PopupPreviewController { if (this._frame === null || this._frame.contentWindow === null) { return; } this._frame.contentWindow.postMessage({action, params}, this._targetOrigin); } - - _updatePopupPreviewVisibility() { - const value = this._showPopupPreviewCheckbox.checked; - this._previewFrameContainer.classList.toggle('preview-frame-container-visible', value); - this._settingsController.setGlobalSetting('global.showPopupPreview', value); - } } |