summaryrefslogtreecommitdiff
path: root/ext/js/display/search-display-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-05-15 15:31:54 -0400
committerGitHub <noreply@github.com>2021-05-15 15:31:54 -0400
commitbc6fb4e7d742b40bb18965f5aa3e8a1a867b068e (patch)
treead63337ae6b9e9acb0000cabbc91235fc2f02ec4 /ext/js/display/search-display-controller.js
parent8442a8ba22525f45bcbb81e162962f2c97e5d9dc (diff)
Fix incorrect _updateClipboardMonitorEnabled invocation (#1677)
Diffstat (limited to 'ext/js/display/search-display-controller.js')
-rw-r--r--ext/js/display/search-display-controller.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/js/display/search-display-controller.js b/ext/js/display/search-display-controller.js
index 69c59ab3..95f8b6c1 100644
--- a/ext/js/display/search-display-controller.js
+++ b/ext/js/display/search-display-controller.js
@@ -50,6 +50,8 @@ class SearchDisplayController {
async prepare() {
await this._display.updateOptions();
+ this._searchPersistentStateController.on('modeChange', this._onModeChange.bind(this));
+
chrome.runtime.onMessage.addListener(this._onMessage.bind(this));
yomichan.on('optionsUpdated', this._onOptionsUpdated.bind(this));
@@ -65,6 +67,8 @@ class SearchDisplayController {
['updateSearchQuery', {async: false, handler: this._onExternalSearchUpdate.bind(this)}]
]);
+ this._updateClipboardMonitorEnabled();
+
this._display.autoPlayAudioDelay = 0;
this._display.queryParserVisible = true;
this._display.setHistorySettings({useBrowserHistory: true});
@@ -217,6 +221,10 @@ class SearchDisplayController {
this._setClipboardMonitorEnabled(enabled);
}
+ _onModeChange() {
+ this._updateClipboardMonitorEnabled();
+ }
+
_setWanakanaEnabled(enabled) {
if (this._queryInputEventsSetup && this._wanakanaEnabled === enabled) { return; }