Rename context.js to context-main.js

This commit is contained in:
toasted-nutbread 2020-04-19 14:27:15 -04:00
parent 3c8eb9eee0
commit 3edaf319da
2 changed files with 9 additions and 3 deletions

View File

@ -185,6 +185,6 @@
<script src="/bg/js/options.js"></script> <script src="/bg/js/options.js"></script>
<script src="/bg/js/util.js"></script> <script src="/bg/js/util.js"></script>
<script src="/bg/js/context.js"></script> <script src="/bg/js/context-main.js"></script>
</body> </body>
</html> </html>

View File

@ -51,7 +51,7 @@ function setupButtonEvents(selector, command, url) {
} }
} }
window.addEventListener('DOMContentLoaded', async () => { async function mainInner() {
await yomichan.prepare(); await yomichan.prepare();
showExtensionInfo(); showExtensionInfo();
@ -86,4 +86,10 @@ window.addEventListener('DOMContentLoaded', async () => {
} }
}, 10); }, 10);
}); });
}); }
async function main() {
window.addEventListener('DOMContentLoaded', mainInner, false);
}
main();