diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-08-10 19:23:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 19:23:05 -0400 |
commit | 916189f402c3310d0c2bfb3f2a8a9dc20991288e (patch) | |
tree | 29ecad860c6c0ffd9d5fbeaf315b03c7f663bfd0 /ext/js/display/display.js | |
parent | 69e448a95547479bb595530dcbb89bfe017a8aed (diff) |
Fix auto-play not working on the search page (#1882)
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r-- | ext/js/display/display.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js index a9581def..f3d46054 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -111,7 +111,7 @@ class Display extends EventDispatcher { this._optionToggleHotkeyHandler = new OptionToggleHotkeyHandler(this); this._elementOverflowController = new ElementOverflowController(); this._displayAnki = new DisplayAnki(this, japaneseUtil); - this._popupVisible = false; + this._frameVisible = (pageType === 'search'); this._hotkeyHandler.registerActions([ ['close', () => { this._onHotkeyClose(); }], @@ -210,8 +210,8 @@ class Display extends EventDispatcher { return this._fullQuery; } - get popupVisible() { - return this._popupVisible; + get frameVisible() { + return this._frameVisible; } async prepare() { @@ -527,7 +527,7 @@ class Display extends EventDispatcher { } _onMessageVisibilityChanged({value}) { - this._popupVisible = value; + this._frameVisible = value; if (!value) { this._displayAudio.clearAutoPlayTimer(); this._displayAudio.stopAudio(); |