aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/search.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-22 11:19:21 -0500
committerGitHub <noreply@github.com>2020-11-22 11:19:21 -0500
commit7234cce4ae528db3e6177da1dbd499abd3c83837 (patch)
treeee70e6d7819a6de2d549e44c6319705117545f1c /ext/bg/js/search.js
parent7b6a4c4e36ce65af376cd87f5f9e7c657ef2a12c (diff)
Refactor nested popup/frontend setup (#1052)
Diffstat (limited to 'ext/bg/js/search.js')
-rw-r--r--ext/bg/js/search.js31
1 files changed, 1 insertions, 30 deletions
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 1dda0f43..e68dccfd 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -25,7 +25,7 @@
class DisplaySearch extends Display {
constructor() {
- super();
+ super('search');
this._searchButton = document.querySelector('#search-button');
this._queryInput = document.querySelector('#search-textbox');
this._introElement = document.querySelector('#intro');
@@ -85,8 +85,6 @@ class DisplaySearch extends Display {
this._onModeChange();
- await this._prepareNestedPopups();
-
this.initializeState();
this._isPrepared = true;
@@ -319,33 +317,6 @@ class DisplaySearch extends Display {
this._introElement.style.height = '0';
}
- async _prepareNestedPopups() {
- let complete = false;
-
- const onOptionsUpdated = async () => {
- const optionsContext = this.getOptionsContext();
- const options = await api.optionsGet(optionsContext);
- if (!options.scanning.enableOnSearchPage || complete) { return; }
-
- complete = true;
- yomichan.off('optionsUpdated', onOptionsUpdated);
-
- try {
- await this.setupNestedPopups({
- depth: 1,
- useProxyPopup: false,
- pageType: 'search'
- });
- } catch (e) {
- yomichan.logError(e);
- }
- };
-
- yomichan.on('optionsUpdated', onOptionsUpdated);
-
- await onOptionsUpdated();
- }
-
async _setClipboardMonitorEnabled(value) {
let modify = true;
if (value) {