Move container definition

This commit is contained in:
toasted-nutbread 2019-12-15 21:04:53 -05:00
parent c3ea952844
commit 37da5fef59

View File

@ -26,6 +26,13 @@ class Popup {
this.parent = null; this.parent = null;
this.child = null; this.child = null;
this.childrenSupported = true; 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 = document.createElement('iframe');
this.container.className = 'yomichan-float'; this.container.className = 'yomichan-float';
this.container.addEventListener('mousedown', (e) => e.stopPropagation()); 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.setAttribute('src', chrome.runtime.getURL('/fg/float.html'));
this.container.style.width = '0px'; this.container.style.width = '0px';
this.container.style.height = '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(); this._updateVisibility();
} }