From 722a2a4bce08ae2e69d7abb1c5d09842bd29ebfa Mon Sep 17 00:00:00 2001 From: siikamiika Date: Wed, 5 Feb 2020 13:26:25 +0200 Subject: disable internal clipboard monitor in native popup --- ext/bg/js/search.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js index 34dac15b..feadefe4 100644 --- a/ext/bg/js/search.js +++ b/ext/bg/js/search.js @@ -49,11 +49,12 @@ class DisplaySearch extends Display { try { await this.initialize(); + const {query='', mode=''} = DisplaySearch.parseQueryStringFromLocation(window.location.href); + if (this.search !== null) { this.search.addEventListener('click', (e) => this.onSearch(e), false); } if (this.query !== null) { - const {query='', mode=''} = DisplaySearch.parseQueryStringFromLocation(window.location.href); document.documentElement.dataset.searchMode = mode; this.query.addEventListener('input', () => this.onSearchInput(), false); @@ -86,7 +87,7 @@ class DisplaySearch extends Display { } this.onSearchQueryUpdated(this.query.value, false); } - if (this.clipboardMonitorEnable !== null) { + if (this.clipboardMonitorEnable !== null && mode !== 'popup') { if (this.options.general.enableClipboardMonitor === true) { this.clipboardMonitorEnable.checked = true; this.clipboardMonitor.start(); -- cgit v1.2.3