summaryrefslogtreecommitdiff
path: root/ext/fg/js/popup.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/fg/js/popup.js')
-rw-r--r--ext/fg/js/popup.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index c3ec4583..0f6af1a5 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -26,6 +26,13 @@ class Popup {
this.parent = null;
this.child = null;
this.childrenSupported = true;
+ this.injectPromise = null;
+ this.isInjected = false;
+ this.visible = false;
+ this.visibleOverride = null;
+ this.options = null;
+ this.stylesheetInjectedViaApi = false;
+
this.container = document.createElement('iframe');
this.container.className = 'yomichan-float';
this.container.addEventListener('mousedown', (e) => e.stopPropagation());
@@ -33,12 +40,7 @@ class Popup {
this.container.setAttribute('src', chrome.runtime.getURL('/fg/float.html'));
this.container.style.width = '0px';
this.container.style.height = '0px';
- this.injectPromise = null;
- this.isInjected = false;
- this.visible = false;
- this.visibleOverride = null;
- this.options = null;
- this.stylesheetInjectedViaApi = false;
+
this._updateVisibility();
}