From 3edaf319da31ef943ada9661eb67019a75e6b7ac Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 19 Apr 2020 14:27:15 -0400 Subject: [PATCH] Rename context.js to context-main.js --- ext/bg/context.html | 2 +- ext/bg/js/{context.js => context-main.js} | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) rename ext/bg/js/{context.js => context-main.js} (95%) diff --git a/ext/bg/context.html b/ext/bg/context.html index 0e50ed7c..394869b1 100644 --- a/ext/bg/context.html +++ b/ext/bg/context.html @@ -185,6 +185,6 @@ - + diff --git a/ext/bg/js/context.js b/ext/bg/js/context-main.js similarity index 95% rename from ext/bg/js/context.js rename to 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();