summaryrefslogtreecommitdiff
path: root/ext/bg/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r--ext/bg/js/search.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index f3cba7ae..9acccb90 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -102,8 +102,7 @@ class DisplaySearch extends Display {
this.wanakanaEnable.addEventListener('change', this.onWanakanaEnableChange.bind(this));
window.addEventListener('popstate', this.onPopState.bind(this));
window.addEventListener('copy', this.onCopy.bind(this));
-
- this.clipboardMonitor.onClipboardText = this.onExternalSearchUpdate.bind(this);
+ this.clipboardMonitor.on('change', this.onExternalSearchUpdate.bind(this));
this.updateSearchButton();
} catch (e) {
@@ -198,7 +197,7 @@ class DisplaySearch extends Display {
this.clipboardMonitor.setPreviousText(document.getSelection().toString().trim());
}
- onExternalSearchUpdate(text) {
+ onExternalSearchUpdate({text}) {
this.setQuery(text);
const url = new URL(window.location.href);
url.searchParams.set('query', text);