aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-15 21:04:53 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2019-12-16 19:54:41 -0500
commit37da5fef59fcf0b0391e8e0cc12c5d29674e7b47 (patch)
treea7901839cb0f9be52d3542b42399bb3e71d1e01d /ext
parentc3ea9528447b130517fc75257d07e6a5250c2f82 (diff)
Move container definition
Diffstat (limited to 'ext')
-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();
}