aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/bg/js/search-main.js (renamed from ext/bg/js/search-frontend.js)4
-rw-r--r--ext/bg/js/search.js8
-rw-r--r--ext/bg/search.html3
3 files changed, 6 insertions, 9 deletions
diff --git a/ext/bg/js/search-frontend.js b/ext/bg/js/search-main.js
index bda46a98..91c39222 100644
--- a/ext/bg/js/search-frontend.js
+++ b/ext/bg/js/search-main.js
@@ -16,6 +16,7 @@
*/
/* global
+ * DisplaySearch
* apiOptionsGet
*/
@@ -54,6 +55,9 @@ function injectSearchFrontend() {
async function main() {
await yomichan.prepare();
+ const displaySearch = new DisplaySearch();
+ await displaySearch.prepare();
+
let optionsApplied = false;
const applyOptions = async () => {
diff --git a/ext/bg/js/search.js b/ext/bg/js/search.js
index 871c576b..266cccc8 100644
--- a/ext/bg/js/search.js
+++ b/ext/bg/js/search.js
@@ -72,12 +72,6 @@ class DisplaySearch extends Display {
]);
}
- static create() {
- const instance = new DisplaySearch();
- instance.prepare();
- return instance;
- }
-
async prepare() {
try {
await super.prepare();
@@ -376,5 +370,3 @@ class DisplaySearch extends Display {
}
}
}
-
-DisplaySearch.instance = DisplaySearch.create();
diff --git a/ext/bg/search.html b/ext/bg/search.html
index fe88e264..9a824776 100644
--- a/ext/bg/search.html
+++ b/ext/bg/search.html
@@ -94,6 +94,7 @@
<script src="/bg/js/search-query-parser.js"></script>
<script src="/bg/js/clipboard-monitor.js"></script>
<script src="/bg/js/search.js"></script>
- <script src="/bg/js/search-frontend.js"></script>
+
+ <script src="/bg/js/search-main.js"></script>
</body>
</html>