summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/popup-preview-frame.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/settings/popup-preview-frame.js')
-rw-r--r--ext/bg/js/settings/popup-preview-frame.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/ext/bg/js/settings/popup-preview-frame.js b/ext/bg/js/settings/popup-preview-frame.js
index 2b727cbd..54f246e3 100644
--- a/ext/bg/js/settings/popup-preview-frame.js
+++ b/ext/bg/js/settings/popup-preview-frame.js
@@ -35,7 +35,6 @@ class SettingsPopupPreview {
async prepare() {
// Setup events
- window.addEventListener('resize', (e) => this.onWindowResize(e), false);
window.addEventListener('message', (e) => this.onMessage(e), false);
const themeDarkCheckbox = document.querySelector('#theme-dark-checkbox');
@@ -96,16 +95,6 @@ class SettingsPopupPreview {
return result;
}
- onWindowResize() {
- if (this.frontend === null) { return; }
- const textSource = this.textSource;
- if (textSource === null) { return; }
-
- const elementRect = textSource.getRect();
- const writingMode = textSource.getWritingMode();
- this.frontend.popup.showContent(elementRect, writingMode);
- }
-
onMessage(e) {
const {action, params} = e.data;
const handler = SettingsPopupPreview._messageHandlers.get(action);
@@ -163,6 +152,7 @@ class SettingsPopupPreview {
try {
await this.frontend.onSearchSource(source, 'script');
+ this.frontend.setCurrentTextSource(source);
} finally {
source.cleanup();
}