From 96932119f8627725774ffdc66a82326d7302db30 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 22 Jun 2020 19:27:40 -0400 Subject: Remove window. from visualViewport, use local variable instead (#621) --- ext/fg/js/frontend.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/fg') diff --git a/ext/fg/js/frontend.js b/ext/fg/js/frontend.js index 71e53b03..ae0953f9 100644 --- a/ext/fg/js/frontend.js +++ b/ext/fg/js/frontend.js @@ -106,8 +106,8 @@ class Frontend { const visualViewport = window.visualViewport; if (visualViewport !== null && typeof visualViewport === 'object') { - window.visualViewport.addEventListener('scroll', this._onVisualViewportScroll.bind(this)); - window.visualViewport.addEventListener('resize', this._onVisualViewportResize.bind(this)); + visualViewport.addEventListener('scroll', this._onVisualViewportScroll.bind(this)); + visualViewport.addEventListener('resize', this._onVisualViewportResize.bind(this)); } yomichan.on('orphaned', this._onOrphaned.bind(this)); -- cgit v1.2.3