diff options
Diffstat (limited to 'ext/fg/js')
| -rw-r--r-- | ext/fg/js/float.js (renamed from ext/fg/js/display-frame.js) | 8 | ||||
| -rw-r--r-- | ext/fg/js/popup.js | 4 | 
2 files changed, 7 insertions, 5 deletions
diff --git a/ext/fg/js/display-frame.js b/ext/fg/js/float.js index e3f3e692..59293239 100644 --- a/ext/fg/js/display-frame.js +++ b/ext/fg/js/float.js @@ -17,10 +17,10 @@   */ -window.yomichan_frame = new class extends Display { +class DisplayFloat extends Display {      constructor() {          super($('#spinner'), $('#definitions')); -        $(window).on('message', this.onMessage.bind(this)); +        $(window).on('message', e => this.onMessage(e));      }      onError(error) { @@ -83,4 +83,6 @@ window.yomichan_frame = new class extends Display {              super.onKeyDown(e);          }      } -}; +} + +window.yomichan_display = new DisplayFloat(); diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js index ba3289d4..8e61169a 100644 --- a/ext/fg/js/popup.js +++ b/ext/fg/js/popup.js @@ -20,10 +20,10 @@  class Popup {      constructor() {          this.container = document.createElement('iframe'); -        this.container.id = 'yomichan-popup'; +        this.container.id = 'yomichan-float';          this.container.addEventListener('mousedown', e => e.stopPropagation());          this.container.addEventListener('scroll', e => e.stopPropagation()); -        this.container.setAttribute('src', chrome.extension.getURL('/fg/frame.html')); +        this.container.setAttribute('src', chrome.extension.getURL('/fg/float.html'));          this.container.style.width = '0px';          this.container.style.height = '0px';          this.injected = null;  |