From 8c02fb634595d47149c4ba6fecd470bda0bb82ed Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Wed, 3 Apr 2024 14:37:47 -0400 Subject: [PATCH] Use imports in app.js --- src/app.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index fb10725d..5fcc57ed 100644 --- a/src/app.js +++ b/src/app.js @@ -1,5 +1,15 @@ // @ts-check +import { $ColorBox } from "./$ColorBox.js"; +import { get_winter_palette } from "./color-data.js"; +import { show_help } from "./help.js"; +import { $G, E, TAU, get_file_extension, get_help_folder_icon } from "./helpers.js"; +import { rotate } from "./image-manipulation.js"; +import { menus } from "./menus.js"; +import { showMessageBox } from "./msgbox.js"; +import { disable_speech_recognition, enable_speech_recognition } from "./speech-recognition.js"; +import { get_theme } from "./theme.js"; + // #region Exports // Q: Why are the exports at the top of the file? @@ -305,9 +315,9 @@ const update_from_url_params = () => { } if (location.hash.match(/speech-recognition-mode/i)) { - window.enable_speech_recognition && enable_speech_recognition(); + enable_speech_recognition?.(); } else { - window.disable_speech_recognition && disable_speech_recognition(); + disable_speech_recognition?.(); } $("body").toggleClass("compare-reference", !!location.hash.match(/compare-reference/i));