summaryrefslogtreecommitdiff
path: root/ext/mixed
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-02-13 12:13:01 -0500
committerGitHub <noreply@github.com>2021-02-13 12:13:01 -0500
commitedc22b98e361707c827326b714ada6fd821c2bec (patch)
treed3e3cc776a5d4f03c46670f931c814222e670593 /ext/mixed
parentd5964ee4d45c95526ad95df300609d6095fc570d (diff)
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
Diffstat (limited to 'ext/mixed')
-rw-r--r--ext/mixed/js/display.js7
1 files changed, 6 insertions, 1 deletions
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();