From 6b07b1e6e158f718fd30c44878a72c3b6ad83fa0 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Mon, 18 Dec 2023 23:41:23 -0500 Subject: IIFE updates (#384) * Remove most IIFEs * Move IIFEs into functions * Don't await background-main --- ext/js/app/content-script-main.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ext/js/app') diff --git a/ext/js/app/content-script-main.js b/ext/js/app/content-script-main.js index 972d032c..7b76fda0 100644 --- a/ext/js/app/content-script-main.js +++ b/ext/js/app/content-script-main.js @@ -22,7 +22,8 @@ import {yomitan} from '../yomitan.js'; import {Frontend} from './frontend.js'; import {PopupFactory} from './popup-factory.js'; -(async () => { +/** Entry point. */ +async function main() { try { await yomitan.prepare(); @@ -57,4 +58,6 @@ import {PopupFactory} from './popup-factory.js'; } catch (e) { log.error(e); } -})(); +} + +await main(); -- cgit v1.2.3