From edc22b98e361707c827326b714ada6fd821c2bec Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sat, 13 Feb 2021 12:13:01 -0500 Subject: Improve search page popup detection (#1378) * Add _getAllTabs function * Add _findTabs * Use _findTabs instead of _findTab * Remove _findTab * Refactor tab check * Add ability to search for a popup native window * Fix dangling comma --- ext/mixed/js/display.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ext/mixed/js') diff --git a/ext/mixed/js/display.js b/ext/mixed/js/display.js index 2acc0d3f..bfb5f8f7 100644 --- a/ext/mixed/js/display.js +++ b/ext/mixed/js/display.js @@ -139,7 +139,8 @@ class Display extends EventDispatcher { ['previousEntryDifferentDictionary', () => { this._focusEntryWithDifferentDictionary(-1, true); }] ]); this.registerMessageHandlers([ - ['setMode', {async: false, handler: this._onMessageSetMode.bind(this)}] + ['setMode', {async: false, handler: this._onMessageSetMode.bind(this)}], + ['getMode', {async: false, handler: this._onMessageGetMode.bind(this)}] ]); this.registerDirectMessageHandlers([ ['setOptionsContext', {async: false, handler: this._onMessageSetOptionsContext.bind(this)}], @@ -493,6 +494,10 @@ class Display extends EventDispatcher { this._setMode(mode, true); } + _onMessageGetMode() { + return this._mode; + } + _onMessageSetOptionsContext({optionsContext}) { this.setOptionsContext(optionsContext); this.searchLast(); -- cgit v1.2.3