aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-19 14:27:15 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-19 14:27:15 -0400
commit3edaf319da31ef943ada9661eb67019a75e6b7ac (patch)
tree6b5d718054fd5c9510cfcd4d7dc994befb6067a0 /ext/bg/js
parent3c8eb9eee009ebe265fbae3f7d7ac0d74fcbdd94 (diff)
Rename context.js to context-main.js
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/context-main.js (renamed from ext/bg/js/context.js)10
1 files changed, 8 insertions, 2 deletions
diff --git a/ext/bg/js/context.js b/ext/bg/js/context-main.js
index e3d4ad4a..67bb4e18 100644
--- a/ext/bg/js/context.js
+++ b/ext/bg/js/context-main.js
@@ -51,7 +51,7 @@ function setupButtonEvents(selector, command, url) {
}
}
-window.addEventListener('DOMContentLoaded', async () => {
+async function mainInner() {
await yomichan.prepare();
showExtensionInfo();
@@ -86,4 +86,10 @@ window.addEventListener('DOMContentLoaded', async () => {
}
}, 10);
});
-});
+}
+
+async function main() {
+ window.addEventListener('DOMContentLoaded', mainInner, false);
+}
+
+main();