diff options
author | Miodec <[email protected]> | 2024-07-18 16:51:48 +0200 |
---|---|---|
committer | Miodec <[email protected]> | 2024-07-18 16:51:48 +0200 |
commit | 8f25076660caa7202023618c3555427a5b893e5b (patch) | |
tree | 7816014ba95d1b3dd537108439d727ab392efff9 | |
parent | e870b001fda4a3ecfa0d6ce61c5c8929ed49479d (diff) | |
download | monkeytype-8f25076660caa7202023618c3555427a5b893e5b.tar.gz monkeytype-8f25076660caa7202023618c3555427a5b893e5b.zip |
add .js to imports
232 files changed, 1307 insertions, 1304 deletions
diff --git a/frontend/src/404.html b/frontend/src/404.html index d364b4e4c..ef4305f6b 100644 --- a/frontend/src/404.html +++ b/frontend/src/404.html @@ -3,7 +3,7 @@ <load src="html/head.html" /> <body> <script type="module" async> - import { loadCSS } from "./ts/utils/misc"; + import { loadCSS } from "./ts/utils/misc.js"; loadCSS("/css/fa.min.css", true); document.getElementById("page404").classList.remove("hidden"); document.getElementById("page404").classList.remove("hidden"); diff --git a/frontend/src/email-handler.html b/frontend/src/email-handler.html index 7deacb540..8b42aed5a 100644 --- a/frontend/src/email-handler.html +++ b/frontend/src/email-handler.html @@ -167,7 +167,7 @@ </body> <script type="module"> import $ from "jquery"; - import { Auth } from "./ts/firebase"; + import { Auth } from "./ts/firebase.js"; import { applyActionCode, verifyPasswordResetCode, diff --git a/frontend/src/ts/ape/adapters/axios-adapter.ts b/frontend/src/ts/ape/adapters/axios-adapter.ts index 5461ebf20..7d3b5ec1b 100644 --- a/frontend/src/ts/ape/adapters/axios-adapter.ts +++ b/frontend/src/ts/ape/adapters/axios-adapter.ts @@ -1,8 +1,8 @@ -import { getAuthenticatedUser, isAuthenticated } from "../../firebase"; +import { getAuthenticatedUser, isAuthenticated } from "../../firebase.js"; import { getIdToken } from "firebase/auth"; import axios, { AxiosRequestConfig, AxiosResponse, isAxiosError } from "axios"; -import { envConfig } from "../../constants/env-config"; -import { createErrorMessage } from "../../utils/misc"; +import { envConfig } from "../../constants/env-config.js"; +import { createErrorMessage } from "../../utils/misc.js"; type AxiosClientMethod = ( endpoint: string, diff --git a/frontend/src/ts/ape/endpoints/index.ts b/frontend/src/ts/ape/endpoints/index.ts index 8656133c4..b59f0e579 100644 --- a/frontend/src/ts/ape/endpoints/index.ts +++ b/frontend/src/ts/ape/endpoints/index.ts @@ -1,14 +1,14 @@ -import Configs from "./configs"; -import Leaderboards from "./leaderboards"; -import Presets from "./presets"; -import Psas from "./psas"; -import Quotes from "./quotes"; -import Results from "./results"; -import Users from "./users"; -import ApeKeys from "./ape-keys"; -import Public from "./public"; -import Configuration from "./configuration"; -import Dev from "./dev"; +import Configs from "./configs.js"; +import Leaderboards from "./leaderboards.js"; +import Presets from "./presets.js"; +import Psas from "./psas.js"; +import Quotes from "./quotes.js"; +import Results from "./results.js"; +import Users from "./users.js"; +import ApeKeys from "./ape-keys.js"; +import Public from "./public.js"; +import Configuration from "./configuration.js"; +import Dev from "./dev.js"; export default { Configs, diff --git a/frontend/src/ts/ape/index.ts b/frontend/src/ts/ape/index.ts index 30fa84b3a..ae455f58e 100644 --- a/frontend/src/ts/ape/index.ts +++ b/frontend/src/ts/ape/index.ts @@ -1,6 +1,6 @@ -import endpoints from "./endpoints"; -import { buildHttpClient } from "./adapters/axios-adapter"; -import { envConfig } from "../constants/env-config"; +import endpoints from "./endpoints.js"; +import { buildHttpClient } from "./adapters/axios-adapter.js"; +import { envConfig } from "../constants/env-config.js"; const API_PATH = ""; const BASE_URL = envConfig.backendUrl; diff --git a/frontend/src/ts/commandline/commandline.ts b/frontend/src/ts/commandline/commandline.ts index bdeb09eec..75a230c79 100644 --- a/frontend/src/ts/commandline/commandline.ts +++ b/frontend/src/ts/commandline/commandline.ts @@ -1,15 +1,15 @@ -import * as Focus from "../test/focus"; -import * as CommandlineLists from "./lists"; -import Config from "../config"; -import * as AnalyticsController from "../controllers/analytics-controller"; -import * as ThemeController from "../controllers/theme-controller"; -import { clearFontPreview } from "../ui"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import * as Notifications from "../elements/notifications"; -import * as OutOfFocus from "../test/out-of-focus"; -import * as ActivePage from "../states/active-page"; -import { focusWords } from "../test/test-ui"; -import * as Loader from "../elements/loader"; +import * as Focus from "../test/focus.js"; +import * as CommandlineLists from "./lists.js"; +import Config from "../config.js"; +import * as AnalyticsController from "../controllers/analytics-controller.js"; +import * as ThemeController from "../controllers/theme-controller.js"; +import { clearFontPreview } from "../ui.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import * as Notifications from "../elements/notifications.js"; +import * as OutOfFocus from "../test/out-of-focus.js"; +import * as ActivePage from "../states/active-page.js"; +import { focusWords } from "../test/test-ui.js"; +import * as Loader from "../elements/loader.js"; type CommandlineMode = "search" | "input"; type InputModeParams = { diff --git a/frontend/src/ts/commandline/lists.ts b/frontend/src/ts/commandline/lists.ts index 6cdec2608..7dcacad77 100644 --- a/frontend/src/ts/commandline/lists.ts +++ b/frontend/src/ts/commandline/lists.ts @@ -1,82 +1,86 @@ -import PunctuationCommands from "./lists/punctuation"; -import ModeCommands from "./lists/mode"; -import TimeCommands from "./lists/time"; -import WordsCommands from "./lists/words"; -import ConfidenceModeCommands from "./lists/confidence-mode"; -import QuoteLengthCommands from "./lists/quote-length"; -import StopOnErrorCommands from "./lists/stop-on-error"; -import NumbersCommands from "./lists/numbers"; -import SmoothCaretCommands from "./lists/smooth-caret"; -import QuickRestartCommands from "./lists/quick-restart"; -import RepeatQuotesCommands from "./lists/repeat-quotes"; -import LiveSpeedStyleCommands from "./lists/live-speed-style"; -import LiveAccStyleCommands from "./lists/live-acc-style"; -import LiveBurstStyleCommands from "./lists/live-burst-style"; -import ShowAverageCommands from "./lists/show-average"; -import KeyTipsCommands from "./lists/key-tips"; -import FreedomModeCommands from "./lists/freedom-mode"; -import StrictSpaceCommands from "./lists/strict-space"; -import BlindModeCommands from "./lists/blind-mode"; -import ShowWordsHistoryCommands from "./lists/show-words-history"; -import IndicateTyposCommands from "./lists/indicate-typos"; -import HideExtraLettersCommands from "./lists/hide-extra-letters"; -import QuickEndCommands from "./lists/quick-end"; -import OppositeShiftModeCommands from "./lists/opposite-shift-mode"; -import SoundOnErrorCommands from "./lists/sound-on-error"; -import SoundVolumeCommands from "./lists/sound-volume"; -import FlipTestColorsCommands from "./lists/flip-test-colors"; -import SmoothLineScrollCommands from "./lists/smooth-line-scroll"; -import AlwaysShowDecimalCommands from "./lists/always-show-decimal"; -import TypingSpeedUnitCommands from "./lists/typing-speed-unit"; -import StartGraphsAtZeroCommands from "./lists/start-graphs-at-zero"; -import LazyModeCommands from "./lists/lazy-mode"; -import ShowAllLinesCommands from "./lists/show-all-lines"; -import ColorfulModeCommands from "./lists/colorful-mode"; -import OutOfFocusWarningCommands from "./lists/out-of-focus-warning"; -import SingleListCommandlineCommands from "./lists/single-list-commandline"; -import CapsLockWarningCommands from "./lists/caps-lock-warning"; -import SoundOnClickCommands from "./lists/sound-on-click"; -import MinWpmCommands from "./lists/min-wpm"; -import MinAccCommands from "./lists/min-acc"; -import MinBurstCommands from "./lists/min-burst"; -import CustomThemeCommands from "./lists/custom-theme"; -import RandomThemeCommands from "./lists/random-theme"; -import DifficultyCommands from "./lists/difficulty"; -import PaceCaretStyleCommands from "./lists/pace-caret-style"; -import PaceCaretModeCommands from "./lists/pace-caret"; -import CaretStyleCommands from "./lists/caret-style"; -import RepeatedPaceCommands from "./lists/repeated-pace"; -import TimerStyleCommands from "./lists/timer-style"; -import TimerColorCommands from "./lists/timer-color"; -import TimerOpacityCommands from "./lists/timer-opacity"; -import HighlightModeCommands from "./lists/highlight-mode"; -import TapeModeCommands from "./lists/tape-mode"; -import BritishEnglishCommands from "./lists/british-english"; -import KeymapModeCommands from "./lists/keymap-mode"; -import KeymapStyleCommands from "./lists/keymap-style"; -import KeymapLegendStyleCommands from "./lists/keymap-legend-style"; -import KeymapShowTopRowCommands from "./lists/keymap-show-top-row"; -import EnableAdsCommands from "./lists/enable-ads"; -import MonkeyPowerLevelCommands from "./lists/monkey-power-level"; -import BailOutCommands from "./lists/bail-out"; -import QuoteFavoriteCommands from "./lists/quote-favorites"; -import ResultSavingCommands from "./lists/result-saving"; -import NavigationCommands from "./lists/navigation"; -import FontSizeCommands from "./lists/font-size"; -import MaxLineWidthCommands from "./lists/max-line-width"; -import ResultScreenCommands from "./lists/result-screen"; -import CustomBackgroundSizeCommands from "./lists/background-size"; -import CustomBackgroundFilterCommands from "./lists/background-filter"; -import AddOrRemoveThemeToFavorite from "./lists/add-or-remove-theme-to-favorites"; - -import TagsCommands from "./lists/tags"; -import CustomThemesListCommands from "./lists/custom-themes-list"; -import PresetsCommands from "./lists/presets"; +import PunctuationCommands from "./lists/punctuation.js"; +import ModeCommands from "./lists/mode.js"; +import TimeCommands from "./lists/time.js"; +import WordsCommands from "./lists/words.js"; +import ConfidenceModeCommands from "./lists/confidence-mode.js"; +import QuoteLengthCommands from "./lists/quote-length.js"; +import StopOnErrorCommands from "./lists/stop-on-error.js"; +import NumbersCommands from "./lists/numbers.js"; +import SmoothCaretCommands from "./lists/smooth-caret.js"; +import QuickRestartCommands from "./lists/quick-restart.js"; +import RepeatQuotesCommands from "./lists/repeat-quotes.js"; +import LiveSpeedStyleCommands from "./lists/live-speed-style.js"; +import LiveAccStyleCommands from "./lists/live-acc-style.js"; +import LiveBurstStyleCommands from "./lists/live-burst-style.js"; +import ShowAverageCommands from "./lists/show-average.js"; +import KeyTipsCommands from "./lists/key-tips.js"; +import FreedomModeCommands from "./lists/freedom-mode.js"; +import StrictSpaceCommands from "./lists/strict-space.js"; +import BlindModeCommands from "./lists/blind-mode.js"; +import ShowWordsHistoryCommands from "./lists/show-words-history.js"; +import IndicateTyposCommands from "./lists/indicate-typos.js"; +import HideExtraLettersCommands from "./lists/hide-extra-letters.js"; +import QuickEndCommands from "./lists/quick-end.js"; +import OppositeShiftModeCommands from "./lists/opposite-shift-mode.js"; +import SoundOnErrorCommands from "./lists/sound-on-error.js"; +import SoundVolumeCommands from "./lists/sound-volume.js"; +import FlipTestColorsCommands from "./lists/flip-test-colors.js"; +import SmoothLineScrollCommands from "./lists/smooth-line-scroll.js"; +import AlwaysShowDecimalCommands from "./lists/always-show-decimal.js"; +import TypingSpeedUnitCommands from "./lists/typing-speed-unit.js"; +import StartGraphsAtZeroCommands from "./lists/start-graphs-at-zero.js"; +import LazyModeCommands from "./lists/lazy-mode.js"; +import ShowAllLinesCommands from "./lists/show-all-lines.js"; +import ColorfulModeCommands from "./lists/colorful-mode.js"; +import OutOfFocusWarningCommands from "./lists/out-of-focus-warning.js"; +import SingleListCommandlineCommands from "./lists/single-list-commandline.js"; +import CapsLockWarningCommands from "./lists/caps-lock-warning.js"; +import SoundOnClickCommands from "./lists/sound-on-click.js"; +import MinWpmCommands from "./lists/min-wpm.js"; +import MinAccCommands from "./lists/min-acc.js"; +import MinBurstCommands from "./lists/min-burst.js"; +import CustomThemeCommands from "./lists/custom-theme.js"; +import RandomThemeCommands from "./lists/random-theme.js"; +import DifficultyCommands from "./lists/difficulty.js"; +import PaceCaretStyleCommands from "./lists/pace-caret-style.js"; +import PaceCaretModeCommands from "./lists/pace-caret.js"; +import CaretStyleCommands from "./lists/caret-style.js"; +import RepeatedPaceCommands from "./lists/repeated-pace.js"; +import TimerStyleCommands from "./lists/timer-style.js"; +import TimerColorCommands from "./lists/timer-color.js"; +import TimerOpacityCommands from "./lists/timer-opacity.js"; +import HighlightModeCommands from "./lists/highlight-mode.js"; +import TapeModeCommands from "./lists/tape-mode.js"; +import BritishEnglishCommands from "./lists/british-english.js"; +import KeymapModeCommands from "./lists/keymap-mode.js"; +import KeymapStyleCommands from "./lists/keymap-style.js"; +import KeymapLegendStyleCommands from "./lists/keymap-legend-style.js"; +import KeymapShowTopRowCommands from "./lists/keymap-show-top-row.js"; +import EnableAdsCommands from "./lists/enable-ads.js"; +import MonkeyPowerLevelCommands from "./lists/monkey-power-level.js"; +import BailOutCommands from "./lists/bail-out.js"; +import QuoteFavoriteCommands from "./lists/quote-favorites.js"; +import ResultSavingCommands from "./lists/result-saving.js"; +import NavigationCommands from "./lists/navigation.js"; +import FontSizeCommands from "./lists/font-size.js"; +import MaxLineWidthCommands from "./lists/max-line-width.js"; +import ResultScreenCommands from "./lists/result-screen.js"; +import CustomBackgroundSizeCommands from "./lists/background-size.js"; +import CustomBackgroundFilterCommands from "./lists/background-filter.js"; +import AddOrRemoveThemeToFavorite from "./lists/add-or-remove-theme-to-favorites.js"; + +import TagsCommands from "./lists/tags.js"; +import CustomThemesListCommands from "./lists/custom-themes-list.js"; +import PresetsCommands from "./lists/presets.js"; import LayoutsCommands, { update as updateLayoutsCommands, } from "./lists/layouts"; -import FunboxCommands, { update as updateFunboxCommands } from "./lists/funbox"; -import ThemesCommands, { update as updateThemesCommands } from "./lists/themes"; +import FunboxCommands, { + update as updateFunboxCommands, +} from "./lists/funbox.js"; +import ThemesCommands, { + update as updateThemesCommands, +} from "./lists/themes.js"; import LoadChallengeCommands, { update as updateLoadChallengeCommands, } from "./lists/load-challenge"; @@ -90,18 +94,18 @@ import KeymapLayoutsCommands, { update as updateKeymapLayoutsCommands, } from "./lists/keymap-layouts"; -import Config, * as UpdateConfig from "../config"; -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import { randomizeTheme } from "../controllers/theme-controller"; -import * as CustomTextPopup from "../modals/custom-text"; -import * as Settings from "../pages/settings"; -import * as Notifications from "../elements/notifications"; -import * as VideoAdPopup from "../popups/video-ad-popup"; -import * as ShareTestSettingsPopup from "../modals/share-test-settings"; -import * as TestStats from "../test/test-stats"; -import * as QuoteSearchModal from "../modals/quote-search"; -import * as FPSCounter from "../elements/fps-counter"; +import Config, * as UpdateConfig from "../config.js"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import { randomizeTheme } from "../controllers/theme-controller.js"; +import * as CustomTextPopup from "../modals/custom-text.js"; +import * as Settings from "../pages/settings.js"; +import * as Notifications from "../elements/notifications.js"; +import * as VideoAdPopup from "../popups/video-ad-popup.js"; +import * as ShareTestSettingsPopup from "../modals/share-test-settings.js"; +import * as TestStats from "../test/test-stats.js"; +import * as QuoteSearchModal from "../modals/quote-search.js"; +import * as FPSCounter from "../elements/fps-counter.js"; const layoutsPromise = JSONData.getLayoutsList(); layoutsPromise diff --git a/frontend/src/ts/commandline/lists/add-or-remove-theme-to-favorites.ts b/frontend/src/ts/commandline/lists/add-or-remove-theme-to-favorites.ts index 0cda2388b..d37668079 100644 --- a/frontend/src/ts/commandline/lists/add-or-remove-theme-to-favorites.ts +++ b/frontend/src/ts/commandline/lists/add-or-remove-theme-to-favorites.ts @@ -1,5 +1,5 @@ -import Config, * as UpdateConfig from "../../config"; -import { randomTheme } from "../../controllers/theme-controller"; +import Config, * as UpdateConfig from "../../config.js"; +import { randomTheme } from "../../controllers/theme-controller.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/always-show-decimal.ts b/frontend/src/ts/commandline/lists/always-show-decimal.ts index 20dce01cc..83ac81e44 100644 --- a/frontend/src/ts/commandline/lists/always-show-decimal.ts +++ b/frontend/src/ts/commandline/lists/always-show-decimal.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Always show decimal places...", diff --git a/frontend/src/ts/commandline/lists/background-filter.ts b/frontend/src/ts/commandline/lists/background-filter.ts index 3e7fc3961..58a799437 100644 --- a/frontend/src/ts/commandline/lists/background-filter.ts +++ b/frontend/src/ts/commandline/lists/background-filter.ts @@ -1,4 +1,4 @@ -import Config, * as UpdateConfig from "../../config"; +import Config, * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom background filter...", diff --git a/frontend/src/ts/commandline/lists/background-size.ts b/frontend/src/ts/commandline/lists/background-size.ts index a3fb5ec3d..8f616a6b2 100644 --- a/frontend/src/ts/commandline/lists/background-size.ts +++ b/frontend/src/ts/commandline/lists/background-size.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom background size...", diff --git a/frontend/src/ts/commandline/lists/bail-out.ts b/frontend/src/ts/commandline/lists/bail-out.ts index a478d4281..fc1216978 100644 --- a/frontend/src/ts/commandline/lists/bail-out.ts +++ b/frontend/src/ts/commandline/lists/bail-out.ts @@ -1,8 +1,8 @@ -import Config from "../../config"; -import * as CustomText from "../../test/custom-text"; -import * as TestLogic from "../../test/test-logic"; -import * as TestState from "../../test/test-state"; -import * as CustomTextState from "../../states/custom-text-name"; +import Config from "../../config.js"; +import * as CustomText from "../../test/custom-text.js"; +import * as TestLogic from "../../test/test-logic.js"; +import * as TestState from "../../test/test-state.js"; +import * as CustomTextState from "../../states/custom-text-name.js"; function canBailOut(): boolean { return ( diff --git a/frontend/src/ts/commandline/lists/blind-mode.ts b/frontend/src/ts/commandline/lists/blind-mode.ts index 720fa8389..a5ab7a133 100644 --- a/frontend/src/ts/commandline/lists/blind-mode.ts +++ b/frontend/src/ts/commandline/lists/blind-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Blind mode...", diff --git a/frontend/src/ts/commandline/lists/british-english.ts b/frontend/src/ts/commandline/lists/british-english.ts index ea7433aba..967726e37 100644 --- a/frontend/src/ts/commandline/lists/british-english.ts +++ b/frontend/src/ts/commandline/lists/british-english.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "British english...", diff --git a/frontend/src/ts/commandline/lists/caps-lock-warning.ts b/frontend/src/ts/commandline/lists/caps-lock-warning.ts index 370fe49c2..c3a80a804 100644 --- a/frontend/src/ts/commandline/lists/caps-lock-warning.ts +++ b/frontend/src/ts/commandline/lists/caps-lock-warning.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Caps lock warning...", diff --git a/frontend/src/ts/commandline/lists/caret-style.ts b/frontend/src/ts/commandline/lists/caret-style.ts index 4eef78a25..17fae3e3d 100644 --- a/frontend/src/ts/commandline/lists/caret-style.ts +++ b/frontend/src/ts/commandline/lists/caret-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Caret style...", diff --git a/frontend/src/ts/commandline/lists/colorful-mode.ts b/frontend/src/ts/commandline/lists/colorful-mode.ts index d5a197529..1d15856aa 100644 --- a/frontend/src/ts/commandline/lists/colorful-mode.ts +++ b/frontend/src/ts/commandline/lists/colorful-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Colorful mode...", diff --git a/frontend/src/ts/commandline/lists/confidence-mode.ts b/frontend/src/ts/commandline/lists/confidence-mode.ts index a163378c5..dfc1e4dd7 100644 --- a/frontend/src/ts/commandline/lists/confidence-mode.ts +++ b/frontend/src/ts/commandline/lists/confidence-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/custom-theme.ts b/frontend/src/ts/commandline/lists/custom-theme.ts index 34a47b2ae..1de23ff46 100644 --- a/frontend/src/ts/commandline/lists/custom-theme.ts +++ b/frontend/src/ts/commandline/lists/custom-theme.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom theme", diff --git a/frontend/src/ts/commandline/lists/custom-themes-list.ts b/frontend/src/ts/commandline/lists/custom-themes-list.ts index 89bb2dc07..5a7d5c2b1 100644 --- a/frontend/src/ts/commandline/lists/custom-themes-list.ts +++ b/frontend/src/ts/commandline/lists/custom-themes-list.ts @@ -1,7 +1,7 @@ -import * as UpdateConfig from "../../config"; -import { isAuthenticated } from "../../firebase"; -import * as DB from "../../db"; -import * as ThemeController from "../../controllers/theme-controller"; +import * as UpdateConfig from "../../config.js"; +import { isAuthenticated } from "../../firebase.js"; +import * as DB from "../../db.js"; +import * as ThemeController from "../../controllers/theme-controller.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom themes list...", diff --git a/frontend/src/ts/commandline/lists/difficulty.ts b/frontend/src/ts/commandline/lists/difficulty.ts index b0a16756c..ac25e2bc6 100644 --- a/frontend/src/ts/commandline/lists/difficulty.ts +++ b/frontend/src/ts/commandline/lists/difficulty.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Difficulty...", diff --git a/frontend/src/ts/commandline/lists/enable-ads.ts b/frontend/src/ts/commandline/lists/enable-ads.ts index f7bc8fdd1..c1249f45e 100644 --- a/frontend/src/ts/commandline/lists/enable-ads.ts +++ b/frontend/src/ts/commandline/lists/enable-ads.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Set enable ads...", diff --git a/frontend/src/ts/commandline/lists/flip-test-colors.ts b/frontend/src/ts/commandline/lists/flip-test-colors.ts index 58ca1c0a4..a35421f5d 100644 --- a/frontend/src/ts/commandline/lists/flip-test-colors.ts +++ b/frontend/src/ts/commandline/lists/flip-test-colors.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Flip test colors...", diff --git a/frontend/src/ts/commandline/lists/font-family.ts b/frontend/src/ts/commandline/lists/font-family.ts index e6f500b20..060e60fd1 100644 --- a/frontend/src/ts/commandline/lists/font-family.ts +++ b/frontend/src/ts/commandline/lists/font-family.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as UI from "../../ui"; +import * as UpdateConfig from "../../config.js"; +import * as UI from "../../ui.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Font family...", diff --git a/frontend/src/ts/commandline/lists/font-size.ts b/frontend/src/ts/commandline/lists/font-size.ts index c4706d626..7b4e91675 100644 --- a/frontend/src/ts/commandline/lists/font-size.ts +++ b/frontend/src/ts/commandline/lists/font-size.ts @@ -1,4 +1,4 @@ -import Config, * as UpdateConfig from "../../config"; +import Config, * as UpdateConfig from "../../config.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/freedom-mode.ts b/frontend/src/ts/commandline/lists/freedom-mode.ts index 3f634319e..4d3ae9112 100644 --- a/frontend/src/ts/commandline/lists/freedom-mode.ts +++ b/frontend/src/ts/commandline/lists/freedom-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Freedom mode...", diff --git a/frontend/src/ts/commandline/lists/funbox.ts b/frontend/src/ts/commandline/lists/funbox.ts index d63b62800..eb244a079 100644 --- a/frontend/src/ts/commandline/lists/funbox.ts +++ b/frontend/src/ts/commandline/lists/funbox.ts @@ -1,8 +1,8 @@ -import * as Funbox from "../../test/funbox/funbox"; -import * as TestLogic from "../../test/test-logic"; -import * as ManualRestart from "../../test/manual-restart-tracker"; -import Config from "../../config"; -import { areFunboxesCompatible } from "../../test/funbox/funbox-validation"; +import * as Funbox from "../../test/funbox/funbox.js"; +import * as TestLogic from "../../test/test-logic.js"; +import * as ManualRestart from "../../test/manual-restart-tracker.js"; +import Config from "../../config.js"; +import { areFunboxesCompatible } from "../../test/funbox/funbox-validation.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Funbox...", diff --git a/frontend/src/ts/commandline/lists/hide-extra-letters.ts b/frontend/src/ts/commandline/lists/hide-extra-letters.ts index da423ac39..80400c112 100644 --- a/frontend/src/ts/commandline/lists/hide-extra-letters.ts +++ b/frontend/src/ts/commandline/lists/hide-extra-letters.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Hide extra letters...", diff --git a/frontend/src/ts/commandline/lists/highlight-mode.ts b/frontend/src/ts/commandline/lists/highlight-mode.ts index 0626fa506..eda506ba9 100644 --- a/frontend/src/ts/commandline/lists/highlight-mode.ts +++ b/frontend/src/ts/commandline/lists/highlight-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Highlight mode...", diff --git a/frontend/src/ts/commandline/lists/indicate-typos.ts b/frontend/src/ts/commandline/lists/indicate-typos.ts index e0c3f3665..3e55c9568 100644 --- a/frontend/src/ts/commandline/lists/indicate-typos.ts +++ b/frontend/src/ts/commandline/lists/indicate-typos.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Indicate typos...", diff --git a/frontend/src/ts/commandline/lists/key-tips.ts b/frontend/src/ts/commandline/lists/key-tips.ts index 2e752c84f..8f88dd451 100644 --- a/frontend/src/ts/commandline/lists/key-tips.ts +++ b/frontend/src/ts/commandline/lists/key-tips.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Key tips...", diff --git a/frontend/src/ts/commandline/lists/keymap-layouts.ts b/frontend/src/ts/commandline/lists/keymap-layouts.ts index 17118501e..cf1b2e843 100644 --- a/frontend/src/ts/commandline/lists/keymap-layouts.ts +++ b/frontend/src/ts/commandline/lists/keymap-layouts.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; -import { capitalizeFirstLetterOfEachWord } from "../../utils/strings"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; +import { capitalizeFirstLetterOfEachWord } from "../../utils/strings.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change keymap layout...", diff --git a/frontend/src/ts/commandline/lists/keymap-legend-style.ts b/frontend/src/ts/commandline/lists/keymap-legend-style.ts index a050e0859..433c05e6b 100644 --- a/frontend/src/ts/commandline/lists/keymap-legend-style.ts +++ b/frontend/src/ts/commandline/lists/keymap-legend-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Keymap legend style...", diff --git a/frontend/src/ts/commandline/lists/keymap-mode.ts b/frontend/src/ts/commandline/lists/keymap-mode.ts index d92bbbcde..e68cf0280 100644 --- a/frontend/src/ts/commandline/lists/keymap-mode.ts +++ b/frontend/src/ts/commandline/lists/keymap-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Keymap mode...", diff --git a/frontend/src/ts/commandline/lists/keymap-show-top-row.ts b/frontend/src/ts/commandline/lists/keymap-show-top-row.ts index 0e8c06833..2ca141f71 100644 --- a/frontend/src/ts/commandline/lists/keymap-show-top-row.ts +++ b/frontend/src/ts/commandline/lists/keymap-show-top-row.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Keymap show top row...", diff --git a/frontend/src/ts/commandline/lists/keymap-style.ts b/frontend/src/ts/commandline/lists/keymap-style.ts index 61768a7bd..0db2cf683 100644 --- a/frontend/src/ts/commandline/lists/keymap-style.ts +++ b/frontend/src/ts/commandline/lists/keymap-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Keymap style...", diff --git a/frontend/src/ts/commandline/lists/languages.ts b/frontend/src/ts/commandline/lists/languages.ts index 01b95dab2..bdbe8982c 100644 --- a/frontend/src/ts/commandline/lists/languages.ts +++ b/frontend/src/ts/commandline/lists/languages.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; import { capitalizeFirstLetterOfEachWord, getLanguageDisplayString, diff --git a/frontend/src/ts/commandline/lists/layouts.ts b/frontend/src/ts/commandline/lists/layouts.ts index df1c83dc0..26b50b6b2 100644 --- a/frontend/src/ts/commandline/lists/layouts.ts +++ b/frontend/src/ts/commandline/lists/layouts.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; -import { capitalizeFirstLetterOfEachWord } from "../../utils/strings"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; +import { capitalizeFirstLetterOfEachWord } from "../../utils/strings.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Layout emulator...", diff --git a/frontend/src/ts/commandline/lists/lazy-mode.ts b/frontend/src/ts/commandline/lists/lazy-mode.ts index 9d1694a52..b15d8b3a9 100644 --- a/frontend/src/ts/commandline/lists/lazy-mode.ts +++ b/frontend/src/ts/commandline/lists/lazy-mode.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Lazy mode...", diff --git a/frontend/src/ts/commandline/lists/live-acc-style.ts b/frontend/src/ts/commandline/lists/live-acc-style.ts index 30e3d4f14..af25758a8 100644 --- a/frontend/src/ts/commandline/lists/live-acc-style.ts +++ b/frontend/src/ts/commandline/lists/live-acc-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live acc style...", diff --git a/frontend/src/ts/commandline/lists/live-burst-style.ts b/frontend/src/ts/commandline/lists/live-burst-style.ts index 9af83a78a..670733804 100644 --- a/frontend/src/ts/commandline/lists/live-burst-style.ts +++ b/frontend/src/ts/commandline/lists/live-burst-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live burst style...", diff --git a/frontend/src/ts/commandline/lists/live-speed-style.ts b/frontend/src/ts/commandline/lists/live-speed-style.ts index b3a5914de..1dbf39d05 100644 --- a/frontend/src/ts/commandline/lists/live-speed-style.ts +++ b/frontend/src/ts/commandline/lists/live-speed-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live speed style...", diff --git a/frontend/src/ts/commandline/lists/load-challenge.ts b/frontend/src/ts/commandline/lists/load-challenge.ts index e260ff2db..d659c6858 100644 --- a/frontend/src/ts/commandline/lists/load-challenge.ts +++ b/frontend/src/ts/commandline/lists/load-challenge.ts @@ -1,7 +1,7 @@ -import { navigate } from "../../controllers/route-controller"; -import * as ChallengeController from "../../controllers/challenge-controller"; -import * as TestLogic from "../../test/test-logic"; -import { capitalizeFirstLetterOfEachWord } from "../../utils/strings"; +import { navigate } from "../../controllers/route-controller.js"; +import * as ChallengeController from "../../controllers/challenge-controller.js"; +import * as TestLogic from "../../test/test-logic.js"; +import { capitalizeFirstLetterOfEachWord } from "../../utils/strings.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Load challenge...", diff --git a/frontend/src/ts/commandline/lists/max-line-width.ts b/frontend/src/ts/commandline/lists/max-line-width.ts index ad97d6335..9c2d3fb8d 100644 --- a/frontend/src/ts/commandline/lists/max-line-width.ts +++ b/frontend/src/ts/commandline/lists/max-line-width.ts @@ -1,4 +1,4 @@ -import Config, * as UpdateConfig from "../../config"; +import Config, * as UpdateConfig from "../../config.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/min-acc.ts b/frontend/src/ts/commandline/lists/min-acc.ts index 84466ef8e..d9d036a02 100644 --- a/frontend/src/ts/commandline/lists/min-acc.ts +++ b/frontend/src/ts/commandline/lists/min-acc.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change min accuracy mode...", diff --git a/frontend/src/ts/commandline/lists/min-burst.ts b/frontend/src/ts/commandline/lists/min-burst.ts index 0ecd089ba..fcf374a6e 100644 --- a/frontend/src/ts/commandline/lists/min-burst.ts +++ b/frontend/src/ts/commandline/lists/min-burst.ts @@ -1,5 +1,5 @@ -import Config, * as UpdateConfig from "../../config"; -import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units"; +import Config, * as UpdateConfig from "../../config.js"; +import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change min burst mode...", diff --git a/frontend/src/ts/commandline/lists/min-wpm.ts b/frontend/src/ts/commandline/lists/min-wpm.ts index 67a03f0e1..8d59b6d16 100644 --- a/frontend/src/ts/commandline/lists/min-wpm.ts +++ b/frontend/src/ts/commandline/lists/min-wpm.ts @@ -1,5 +1,5 @@ -import Config, * as UpdateConfig from "../../config"; -import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units"; +import Config, * as UpdateConfig from "../../config.js"; +import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change min speed mode...", diff --git a/frontend/src/ts/commandline/lists/mode.ts b/frontend/src/ts/commandline/lists/mode.ts index 78a8fd8d9..12f516af0 100644 --- a/frontend/src/ts/commandline/lists/mode.ts +++ b/frontend/src/ts/commandline/lists/mode.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; -import * as ManualRestart from "../../test/manual-restart-tracker"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; +import * as ManualRestart from "../../test/manual-restart-tracker.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/monkey-power-level.ts b/frontend/src/ts/commandline/lists/monkey-power-level.ts index da530873e..1b1eb36c2 100644 --- a/frontend/src/ts/commandline/lists/monkey-power-level.ts +++ b/frontend/src/ts/commandline/lists/monkey-power-level.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Power mode...", diff --git a/frontend/src/ts/commandline/lists/navigation.ts b/frontend/src/ts/commandline/lists/navigation.ts index 9fa9c352d..44b532bc7 100644 --- a/frontend/src/ts/commandline/lists/navigation.ts +++ b/frontend/src/ts/commandline/lists/navigation.ts @@ -1,5 +1,5 @@ -import { navigate } from "../../controllers/route-controller"; -import { toggleFullscreen } from "../../utils/misc"; +import { navigate } from "../../controllers/route-controller.js"; +import { toggleFullscreen } from "../../utils/misc.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/numbers.ts b/frontend/src/ts/commandline/lists/numbers.ts index 26cee7546..3b409d7c3 100644 --- a/frontend/src/ts/commandline/lists/numbers.ts +++ b/frontend/src/ts/commandline/lists/numbers.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Numbers...", diff --git a/frontend/src/ts/commandline/lists/opposite-shift-mode.ts b/frontend/src/ts/commandline/lists/opposite-shift-mode.ts index 507ec9627..c2af96e5c 100644 --- a/frontend/src/ts/commandline/lists/opposite-shift-mode.ts +++ b/frontend/src/ts/commandline/lists/opposite-shift-mode.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as ModesNotice from "./../../elements/modes-notice"; +import * as UpdateConfig from "../../config.js"; +import * as ModesNotice from "./../../elements/modes-notice.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change opposite shift mode...", diff --git a/frontend/src/ts/commandline/lists/out-of-focus-warning.ts b/frontend/src/ts/commandline/lists/out-of-focus-warning.ts index 36c3e0fa7..c71075d74 100644 --- a/frontend/src/ts/commandline/lists/out-of-focus-warning.ts +++ b/frontend/src/ts/commandline/lists/out-of-focus-warning.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Colorful mode...", diff --git a/frontend/src/ts/commandline/lists/pace-caret-style.ts b/frontend/src/ts/commandline/lists/pace-caret-style.ts index f7db6e19a..573af7c85 100644 --- a/frontend/src/ts/commandline/lists/pace-caret-style.ts +++ b/frontend/src/ts/commandline/lists/pace-caret-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change pace caret style...", diff --git a/frontend/src/ts/commandline/lists/pace-caret.ts b/frontend/src/ts/commandline/lists/pace-caret.ts index aefbc55fb..67b8a98c2 100644 --- a/frontend/src/ts/commandline/lists/pace-caret.ts +++ b/frontend/src/ts/commandline/lists/pace-caret.ts @@ -1,6 +1,6 @@ -import Config, * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; -import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units"; +import Config, * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; +import { get as getTypingSpeedUnit } from "../../utils/typing-speed-units.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Pace caret mode...", diff --git a/frontend/src/ts/commandline/lists/presets.ts b/frontend/src/ts/commandline/lists/presets.ts index 0f2b8843c..9297daff8 100644 --- a/frontend/src/ts/commandline/lists/presets.ts +++ b/frontend/src/ts/commandline/lists/presets.ts @@ -1,9 +1,9 @@ -import * as DB from "../../db"; -import * as ModesNotice from "../../elements/modes-notice"; -import * as Settings from "../../pages/settings"; -import * as PresetController from "../../controllers/preset-controller"; -import * as EditPresetPopup from "../../modals/edit-preset"; -import { isAuthenticated } from "../../firebase"; +import * as DB from "../../db.js"; +import * as ModesNotice from "../../elements/modes-notice.js"; +import * as Settings from "../../pages/settings.js"; +import * as PresetController from "../../controllers/preset-controller.js"; +import * as EditPresetPopup from "../../modals/edit-preset.js"; +import { isAuthenticated } from "../../firebase.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Presets...", diff --git a/frontend/src/ts/commandline/lists/punctuation.ts b/frontend/src/ts/commandline/lists/punctuation.ts index 4bef072ca..a95a66ebd 100644 --- a/frontend/src/ts/commandline/lists/punctuation.ts +++ b/frontend/src/ts/commandline/lists/punctuation.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/quick-end.ts b/frontend/src/ts/commandline/lists/quick-end.ts index 4ff21385f..8b07fd739 100644 --- a/frontend/src/ts/commandline/lists/quick-end.ts +++ b/frontend/src/ts/commandline/lists/quick-end.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Quick end...", diff --git a/frontend/src/ts/commandline/lists/quick-restart.ts b/frontend/src/ts/commandline/lists/quick-restart.ts index 803a16fbf..904de883d 100644 --- a/frontend/src/ts/commandline/lists/quick-restart.ts +++ b/frontend/src/ts/commandline/lists/quick-restart.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Quick restart...", diff --git a/frontend/src/ts/commandline/lists/quote-favorites.ts b/frontend/src/ts/commandline/lists/quote-favorites.ts index 5a859a0bb..fe68ea852 100644 --- a/frontend/src/ts/commandline/lists/quote-favorites.ts +++ b/frontend/src/ts/commandline/lists/quote-favorites.ts @@ -1,10 +1,10 @@ -import Config from "../../config"; -import QuotesController from "../../controllers/quotes-controller"; -import * as Notifications from "../../elements/notifications"; -import { isAuthenticated } from "../../firebase"; -import { createErrorMessage } from "../../utils/misc"; -import * as Loader from "../../elements/loader"; -import * as TestWords from "../../test/test-words"; +import Config from "../../config.js"; +import QuotesController from "../../controllers/quotes-controller.js"; +import * as Notifications from "../../elements/notifications.js"; +import { isAuthenticated } from "../../firebase.js"; +import { createErrorMessage } from "../../utils/misc.js"; +import * as Loader from "../../elements/loader.js"; +import * as TestWords from "../../test/test-words.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/quote-length.ts b/frontend/src/ts/commandline/lists/quote-length.ts index 7b1f5fdde..c1c859711 100644 --- a/frontend/src/ts/commandline/lists/quote-length.ts +++ b/frontend/src/ts/commandline/lists/quote-length.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; -import { isAuthenticated } from "../../firebase"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; +import { isAuthenticated } from "../../firebase.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/random-theme.ts b/frontend/src/ts/commandline/lists/random-theme.ts index c2b29cae7..9f798dc9b 100644 --- a/frontend/src/ts/commandline/lists/random-theme.ts +++ b/frontend/src/ts/commandline/lists/random-theme.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../../config"; -import { isAuthenticated } from "../../firebase"; -import * as Notifications from "../../elements/notifications"; +import * as UpdateConfig from "../../config.js"; +import { isAuthenticated } from "../../firebase.js"; +import * as Notifications from "../../elements/notifications.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Random theme...", diff --git a/frontend/src/ts/commandline/lists/repeat-quotes.ts b/frontend/src/ts/commandline/lists/repeat-quotes.ts index 3265f9e44..94ed98a62 100644 --- a/frontend/src/ts/commandline/lists/repeat-quotes.ts +++ b/frontend/src/ts/commandline/lists/repeat-quotes.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Repeat quotes...", diff --git a/frontend/src/ts/commandline/lists/repeated-pace.ts b/frontend/src/ts/commandline/lists/repeated-pace.ts index d4eab1042..061c5aff7 100644 --- a/frontend/src/ts/commandline/lists/repeated-pace.ts +++ b/frontend/src/ts/commandline/lists/repeated-pace.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Repeated pace...", diff --git a/frontend/src/ts/commandline/lists/result-saving.ts b/frontend/src/ts/commandline/lists/result-saving.ts index 9ff3913e9..cb19997f3 100644 --- a/frontend/src/ts/commandline/lists/result-saving.ts +++ b/frontend/src/ts/commandline/lists/result-saving.ts @@ -1,5 +1,5 @@ -import * as TestState from "../../test/test-state"; -import * as ModesNotice from "../../elements/modes-notice"; +import * as TestState from "../../test/test-state.js"; +import * as ModesNotice from "../../elements/modes-notice.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Result saving...", diff --git a/frontend/src/ts/commandline/lists/result-screen.ts b/frontend/src/ts/commandline/lists/result-screen.ts index 5dfeda821..7b3532db2 100644 --- a/frontend/src/ts/commandline/lists/result-screen.ts +++ b/frontend/src/ts/commandline/lists/result-screen.ts @@ -1,10 +1,10 @@ -import * as TestLogic from "../../test/test-logic"; -import * as TestUI from "../../test/test-ui"; -import * as PractiseWords from "../../test/practise-words"; -import * as Notifications from "../../elements/notifications"; -import * as TestInput from "../../test/test-input"; -import * as TestWords from "../../test/test-words"; -import Config from "../../config"; +import * as TestLogic from "../../test/test-logic.js"; +import * as TestUI from "../../test/test-ui.js"; +import * as PractiseWords from "../../test/practise-words.js"; +import * as Notifications from "../../elements/notifications.js"; +import * as TestInput from "../../test/test-input.js"; +import * as TestWords from "../../test/test-words.js"; +import Config from "../../config.js"; const practiceSubgroup: MonkeyTypes.CommandsSubgroup = { title: "Practice words...", diff --git a/frontend/src/ts/commandline/lists/show-all-lines.ts b/frontend/src/ts/commandline/lists/show-all-lines.ts index e631fc47d..37dd4dbfc 100644 --- a/frontend/src/ts/commandline/lists/show-all-lines.ts +++ b/frontend/src/ts/commandline/lists/show-all-lines.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Show all lines...", diff --git a/frontend/src/ts/commandline/lists/show-average.ts b/frontend/src/ts/commandline/lists/show-average.ts index f2738d3b9..e9c8d8a21 100644 --- a/frontend/src/ts/commandline/lists/show-average.ts +++ b/frontend/src/ts/commandline/lists/show-average.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Show average...", diff --git a/frontend/src/ts/commandline/lists/show-words-history.ts b/frontend/src/ts/commandline/lists/show-words-history.ts index 0fa479ae3..1fd0d77e7 100644 --- a/frontend/src/ts/commandline/lists/show-words-history.ts +++ b/frontend/src/ts/commandline/lists/show-words-history.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Always show words history...", diff --git a/frontend/src/ts/commandline/lists/single-list-commandline.ts b/frontend/src/ts/commandline/lists/single-list-commandline.ts index 6f4723ea5..099c590a7 100644 --- a/frontend/src/ts/commandline/lists/single-list-commandline.ts +++ b/frontend/src/ts/commandline/lists/single-list-commandline.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Single list command line...", diff --git a/frontend/src/ts/commandline/lists/smooth-caret.ts b/frontend/src/ts/commandline/lists/smooth-caret.ts index 437ad7191..4f1a51fea 100644 --- a/frontend/src/ts/commandline/lists/smooth-caret.ts +++ b/frontend/src/ts/commandline/lists/smooth-caret.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Smooth caret...", diff --git a/frontend/src/ts/commandline/lists/smooth-line-scroll.ts b/frontend/src/ts/commandline/lists/smooth-line-scroll.ts index 6f167f147..dff34d09a 100644 --- a/frontend/src/ts/commandline/lists/smooth-line-scroll.ts +++ b/frontend/src/ts/commandline/lists/smooth-line-scroll.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Smooth line scroll...", diff --git a/frontend/src/ts/commandline/lists/sound-on-click.ts b/frontend/src/ts/commandline/lists/sound-on-click.ts index fb85cf7ee..c7ff067b4 100644 --- a/frontend/src/ts/commandline/lists/sound-on-click.ts +++ b/frontend/src/ts/commandline/lists/sound-on-click.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as SoundController from "../../controllers/sound-controller"; +import * as UpdateConfig from "../../config.js"; +import * as SoundController from "../../controllers/sound-controller.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Sound on click...", diff --git a/frontend/src/ts/commandline/lists/sound-on-error.ts b/frontend/src/ts/commandline/lists/sound-on-error.ts index 4022e6fe5..49ad4326c 100644 --- a/frontend/src/ts/commandline/lists/sound-on-error.ts +++ b/frontend/src/ts/commandline/lists/sound-on-error.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as SoundController from "../../controllers/sound-controller"; +import * as UpdateConfig from "../../config.js"; +import * as SoundController from "../../controllers/sound-controller.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Sound on error...", diff --git a/frontend/src/ts/commandline/lists/sound-volume.ts b/frontend/src/ts/commandline/lists/sound-volume.ts index e2ad27552..e5c8c6516 100644 --- a/frontend/src/ts/commandline/lists/sound-volume.ts +++ b/frontend/src/ts/commandline/lists/sound-volume.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as SoundController from "../../controllers/sound-controller"; +import * as UpdateConfig from "../../config.js"; +import * as SoundController from "../../controllers/sound-controller.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Sound volume...", diff --git a/frontend/src/ts/commandline/lists/start-graphs-at-zero.ts b/frontend/src/ts/commandline/lists/start-graphs-at-zero.ts index 9ecd2d3c4..91681801e 100644 --- a/frontend/src/ts/commandline/lists/start-graphs-at-zero.ts +++ b/frontend/src/ts/commandline/lists/start-graphs-at-zero.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Start graphs at zero...", diff --git a/frontend/src/ts/commandline/lists/stop-on-error.ts b/frontend/src/ts/commandline/lists/stop-on-error.ts index d0f8cf5df..6884b276f 100644 --- a/frontend/src/ts/commandline/lists/stop-on-error.ts +++ b/frontend/src/ts/commandline/lists/stop-on-error.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/strict-space.ts b/frontend/src/ts/commandline/lists/strict-space.ts index 36d1f1d03..35807604b 100644 --- a/frontend/src/ts/commandline/lists/strict-space.ts +++ b/frontend/src/ts/commandline/lists/strict-space.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Strict space...", diff --git a/frontend/src/ts/commandline/lists/tags.ts b/frontend/src/ts/commandline/lists/tags.ts index 46f4166e2..a96c7b638 100644 --- a/frontend/src/ts/commandline/lists/tags.ts +++ b/frontend/src/ts/commandline/lists/tags.ts @@ -1,11 +1,11 @@ -import * as DB from "../../db"; -import * as EditTagsPopup from "../../modals/edit-tag"; -import * as ModesNotice from "../../elements/modes-notice"; -import * as TagController from "../../controllers/tag-controller"; -import Config from "../../config"; -import * as PaceCaret from "../../test/pace-caret"; -import { isAuthenticated } from "../../firebase"; -import AnimatedModal from "../../utils/animated-modal"; +import * as DB from "../../db.js"; +import * as EditTagsPopup from "../../modals/edit-tag.js"; +import * as ModesNotice from "../../elements/modes-notice.js"; +import * as TagController from "../../controllers/tag-controller.js"; +import Config from "../../config.js"; +import * as PaceCaret from "../../test/pace-caret.js"; +import { isAuthenticated } from "../../firebase.js"; +import AnimatedModal from "../../utils/animated-modal.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change tags...", diff --git a/frontend/src/ts/commandline/lists/tape-mode.ts b/frontend/src/ts/commandline/lists/tape-mode.ts index 26577f0d6..0aa5fa320 100644 --- a/frontend/src/ts/commandline/lists/tape-mode.ts +++ b/frontend/src/ts/commandline/lists/tape-mode.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Tape mode...", diff --git a/frontend/src/ts/commandline/lists/themes.ts b/frontend/src/ts/commandline/lists/themes.ts index a1c112b59..17cdf69d8 100644 --- a/frontend/src/ts/commandline/lists/themes.ts +++ b/frontend/src/ts/commandline/lists/themes.ts @@ -1,6 +1,6 @@ -import Config, * as UpdateConfig from "../../config"; -import { capitalizeFirstLetterOfEachWord } from "../../utils/strings"; -import * as ThemeController from "../../controllers/theme-controller"; +import Config, * as UpdateConfig from "../../config.js"; +import { capitalizeFirstLetterOfEachWord } from "../../utils/strings.js"; +import * as ThemeController from "../../controllers/theme-controller.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Theme...", diff --git a/frontend/src/ts/commandline/lists/time.ts b/frontend/src/ts/commandline/lists/time.ts index 34416071e..d78b02967 100644 --- a/frontend/src/ts/commandline/lists/time.ts +++ b/frontend/src/ts/commandline/lists/time.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/commandline/lists/timer-color.ts b/frontend/src/ts/commandline/lists/timer-color.ts index ee272a3d2..d6b5e8327 100644 --- a/frontend/src/ts/commandline/lists/timer-color.ts +++ b/frontend/src/ts/commandline/lists/timer-color.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live stats color...", diff --git a/frontend/src/ts/commandline/lists/timer-opacity.ts b/frontend/src/ts/commandline/lists/timer-opacity.ts index 38897fdce..6acf6f192 100644 --- a/frontend/src/ts/commandline/lists/timer-opacity.ts +++ b/frontend/src/ts/commandline/lists/timer-opacity.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live stats opacity...", diff --git a/frontend/src/ts/commandline/lists/timer-style.ts b/frontend/src/ts/commandline/lists/timer-style.ts index b79c6ee02..f28672aa1 100644 --- a/frontend/src/ts/commandline/lists/timer-style.ts +++ b/frontend/src/ts/commandline/lists/timer-style.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Live progress style...", diff --git a/frontend/src/ts/commandline/lists/typing-speed-unit.ts b/frontend/src/ts/commandline/lists/typing-speed-unit.ts index d2884e058..8b253b167 100644 --- a/frontend/src/ts/commandline/lists/typing-speed-unit.ts +++ b/frontend/src/ts/commandline/lists/typing-speed-unit.ts @@ -1,4 +1,4 @@ -import * as UpdateConfig from "../../config"; +import * as UpdateConfig from "../../config.js"; const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Typing speed unit...", diff --git a/frontend/src/ts/commandline/lists/words.ts b/frontend/src/ts/commandline/lists/words.ts index b780f722e..ef909e344 100644 --- a/frontend/src/ts/commandline/lists/words.ts +++ b/frontend/src/ts/commandline/lists/words.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../../config"; -import * as TestLogic from "../../test/test-logic"; +import * as UpdateConfig from "../../config.js"; +import * as TestLogic from "../../test/test-logic.js"; const commands: MonkeyTypes.Command[] = [ { diff --git a/frontend/src/ts/config-validation.ts b/frontend/src/ts/config-validation.ts index 9d9777422..fad682a8e 100644 --- a/frontend/src/ts/config-validation.ts +++ b/frontend/src/ts/config-validation.ts @@ -1,6 +1,6 @@ -import * as Misc from "./utils/misc"; -import * as JSONData from "./utils/json-data"; -import * as Notifications from "./elements/notifications"; +import * as Misc from "./utils/misc.js.js.js"; +import * as JSONData from "./utils/json-data.js"; +import * as Notifications from "./elements/notifications.js"; type PossibleType = | "string" diff --git a/frontend/src/ts/config.ts b/frontend/src/ts/config.ts index 84bddc669..d0dddafe8 100644 --- a/frontend/src/ts/config.ts +++ b/frontend/src/ts/config.ts @@ -1,21 +1,21 @@ -import * as DB from "./db"; -import * as OutOfFocus from "./test/out-of-focus"; -import * as Notifications from "./elements/notifications"; +import * as DB from "./db.js"; +import * as OutOfFocus from "./test/out-of-focus.js"; +import * as Notifications from "./elements/notifications.js"; import { isConfigValueValid, isConfigValueValidAsync, } from "./config-validation"; -import * as ConfigEvent from "./observables/config-event"; -import DefaultConfig from "./constants/default-config"; -import { isAuthenticated } from "./firebase"; -import * as AnalyticsController from "./controllers/analytics-controller"; -import * as AccountButton from "./elements/account-button"; +import * as ConfigEvent from "./observables/config-event.js"; +import DefaultConfig from "./constants/default-config.js"; +import { isAuthenticated } from "./firebase.js"; +import * as AnalyticsController from "./controllers/analytics-controller.js"; +import * as AccountButton from "./elements/account-button.js"; import { debounce } from "throttle-debounce"; import { canSetConfigWithCurrentFunboxes, canSetFunboxWithConfig, } from "./test/funbox/funbox-validation"; -import { reloadAfter } from "./utils/misc"; +import { reloadAfter } from "./utils/misc.js"; export let localStorageConfig: SharedTypes.Config; diff --git a/frontend/src/ts/constants/default-snapshot.ts b/frontend/src/ts/constants/default-snapshot.ts index 28737c9c1..e7e7a2a00 100644 --- a/frontend/src/ts/constants/default-snapshot.ts +++ b/frontend/src/ts/constants/default-snapshot.ts @@ -1,4 +1,4 @@ -import defaultConfig from "./default-config"; +import defaultConfig from "./default-config.js"; export const defaultSnap: MonkeyTypes.Snapshot = { results: undefined, diff --git a/frontend/src/ts/controllers/account-controller.ts b/frontend/src/ts/controllers/account-controller.ts index 6f465784e..d680def9a 100644 --- a/frontend/src/ts/controllers/account-controller.ts +++ b/frontend/src/ts/controllers/account-controller.ts @@ -1,24 +1,24 @@ -import Ape from "../ape"; -import * as Notifications from "../elements/notifications"; -import Config, * as UpdateConfig from "../config"; -import * as AccountButton from "../elements/account-button"; -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import * as Settings from "../pages/settings"; -import * as DB from "../db"; -import * as TestLogic from "../test/test-logic"; -import * as Loader from "../elements/loader"; -import * as PageTransition from "../states/page-transition"; -import * as ActivePage from "../states/active-page"; -import * as LoadingPage from "../pages/loading"; -import * as LoginPage from "../pages/login"; -import * as ResultFilters from "../elements/account/result-filters"; -import * as TagController from "./tag-controller"; -import * as RegisterCaptchaModal from "../modals/register-captcha"; -import * as URLHandler from "../utils/url-handler"; -import * as Account from "../pages/account"; -import * as Alerts from "../elements/alerts"; -import * as SignInOutButton from "../elements/sign-in-out-button"; +import Ape from "../ape.js"; +import * as Notifications from "../elements/notifications.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as AccountButton from "../elements/account-button.js"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Settings from "../pages/settings.js"; +import * as DB from "../db.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as Loader from "../elements/loader.js"; +import * as PageTransition from "../states/page-transition.js"; +import * as ActivePage from "../states/active-page.js"; +import * as LoadingPage from "../pages/loading.js"; +import * as LoginPage from "../pages/login.js"; +import * as ResultFilters from "../elements/account/result-filters.js"; +import * as TagController from "./tag-controller.js"; +import * as RegisterCaptchaModal from "../modals/register-captcha.js"; +import * as URLHandler from "../utils/url-handler.js"; +import * as Account from "../pages/account.js"; +import * as Alerts from "../elements/alerts.js"; +import * as SignInOutButton from "../elements/sign-in-out-button.js"; import { GoogleAuthProvider, GithubAuthProvider, @@ -35,15 +35,15 @@ import { Unsubscribe, AuthProvider, } from "firebase/auth"; -import { Auth, getAuthenticatedUser, isAuthenticated } from "../firebase"; -import { dispatch as dispatchSignUpEvent } from "../observables/google-sign-up-event"; +import { Auth, getAuthenticatedUser, isAuthenticated } from "../firebase.js"; +import { dispatch as dispatchSignUpEvent } from "../observables/google-sign-up-event.js"; import { hideFavoriteQuoteLength, showFavoriteQuoteLength, } from "../test/test-config"; -import * as ConnectionState from "../states/connection"; -import { navigate } from "./route-controller"; -import { getHtmlByUserFlags } from "./user-flag-controller"; +import * as ConnectionState from "../states/connection.js"; +import { navigate } from "./route-controller.js"; +import { getHtmlByUserFlags } from "./user-flag-controller.js"; let signedOutThisSession = false; diff --git a/frontend/src/ts/controllers/ad-controller.ts b/frontend/src/ts/controllers/ad-controller.ts index d6d23b7c1..70fecf518 100644 --- a/frontend/src/ts/controllers/ad-controller.ts +++ b/frontend/src/ts/controllers/ad-controller.ts @@ -1,11 +1,11 @@ import { debounce } from "throttle-debounce"; -// import * as Numbers from "../utils/numbers"; -import * as ConfigEvent from "../observables/config-event"; -import * as BannerEvent from "../observables/banner-event"; -import Config from "../config"; -import * as TestState from "../test/test-state"; -import * as EG from "./eg-ad-controller"; -import * as PW from "./pw-ad-controller"; +// import * as Numbers from "../utils/numbers.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as BannerEvent from "../observables/banner-event.js"; +import Config from "../config.js"; +import * as TestState from "../test/test-state.js"; +import * as EG from "./eg-ad-controller.js"; +import * as PW from "./pw-ad-controller.js"; const breakpoint = 900; let widerThanBreakpoint = true; diff --git a/frontend/src/ts/controllers/analytics-controller.ts b/frontend/src/ts/controllers/analytics-controller.ts index 90b71dab8..8ec022a00 100644 --- a/frontend/src/ts/controllers/analytics-controller.ts +++ b/frontend/src/ts/controllers/analytics-controller.ts @@ -4,8 +4,8 @@ import { logEvent, setAnalyticsCollectionEnabled, } from "firebase/analytics"; -import { app as firebaseApp } from "../firebase"; -import { createErrorMessage } from "../utils/misc"; +import { app as firebaseApp } from "../firebase.js"; +import { createErrorMessage } from "../utils/misc.js"; let analytics: AnalyticsType; diff --git a/frontend/src/ts/controllers/captcha-controller.ts b/frontend/src/ts/controllers/captcha-controller.ts index 09ed2b68a..34b16fc0f 100644 --- a/frontend/src/ts/controllers/captcha-controller.ts +++ b/frontend/src/ts/controllers/captcha-controller.ts @@ -1,4 +1,4 @@ -import { envConfig } from "../constants/env-config"; +import { envConfig } from "../constants/env-config.js"; const siteKey = envConfig.recaptchaSiteKey; const captchas: Record<string, number> = {}; diff --git a/frontend/src/ts/controllers/challenge-controller.ts b/frontend/src/ts/controllers/challenge-controller.ts index 51787079f..1ee7208f0 100644 --- a/frontend/src/ts/controllers/challenge-controller.ts +++ b/frontend/src/ts/controllers/challenge-controller.ts @@ -1,14 +1,14 @@ -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import * as Notifications from "../elements/notifications"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as CustomText from "../test/custom-text"; -import * as Funbox from "../test/funbox/funbox"; -import Config, * as UpdateConfig from "../config"; -import * as TestUI from "../test/test-ui"; -import * as ConfigEvent from "../observables/config-event"; -import * as TestState from "../test/test-state"; -import * as Loader from "../elements/loader"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as CustomText from "../test/custom-text.js"; +import * as Funbox from "../test/funbox/funbox.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as TestUI from "../test/test-ui.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as TestState from "../test/test-state.js"; +import * as Loader from "../elements/loader.js"; let challengeLoading = false; diff --git a/frontend/src/ts/controllers/chart-controller.ts b/frontend/src/ts/controllers/chart-controller.ts index b3eecd510..22e72bd8c 100644 --- a/frontend/src/ts/controllers/chart-controller.ts +++ b/frontend/src/ts/controllers/chart-controller.ts @@ -1,4 +1,4 @@ -import * as ResultWordHighlight from "../elements/result-word-highlight"; +import * as ResultWordHighlight from "../elements/result-word-highlight.js"; import { BarController, @@ -32,7 +32,7 @@ import chartAnnotation, { } from "chartjs-plugin-annotation"; import chartTrendline from "chartjs-plugin-trendline"; -import * as ActivePage from "../states/active-page"; +import * as ActivePage from "../states/active-page.js"; Chart.register( BarController, @@ -59,14 +59,14 @@ Chart.defaults.elements.line.fill = "origin"; import "chartjs-adapter-date-fns"; import { format } from "date-fns/format"; -import Config from "../config"; -import * as ThemeColors from "../elements/theme-colors"; -import * as ConfigEvent from "../observables/config-event"; -import * as TestInput from "../test/test-input"; -import * as DateTime from "../utils/date-and-time"; -import * as Arrays from "../utils/arrays"; -import * as Numbers from "../utils/numbers"; -import { blendTwoHexColors } from "../utils/colors"; +import Config from "../config.js"; +import * as ThemeColors from "../elements/theme-colors.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as TestInput from "../test/test-input.js"; +import * as DateTime from "../utils/date-and-time.js"; +import * as Arrays from "../utils/arrays.js"; +import * as Numbers from "../utils/numbers.js"; +import { blendTwoHexColors } from "../utils/colors.js"; class ChartWithUpdateColors< TType extends ChartType = ChartType, diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 559ec4c64..3e092f8de 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -1,39 +1,39 @@ -import * as TestLogic from "../test/test-logic"; -import * as TestUI from "../test/test-ui"; -import * as TestStats from "../test/test-stats"; -import * as Monkey from "../test/monkey"; -import Config from "../config"; -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import * as Numbers from "../utils/numbers"; -import * as LiveAcc from "../test/live-acc"; -import * as LiveBurst from "../test/live-burst"; -import * as Funbox from "../test/funbox/funbox"; -import * as Sound from "./sound-controller"; -import * as Caret from "../test/caret"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as CustomText from "../test/custom-text"; -import * as LayoutEmulator from "../test/layout-emulator"; -import * as PaceCaret from "../test/pace-caret"; -import * as TimerProgress from "../test/timer-progress"; -import * as Focus from "../test/focus"; -import * as ShiftTracker from "../test/shift-tracker"; -import * as Replay from "../test/replay"; -import * as MonkeyPower from "../elements/monkey-power"; -import * as Notifications from "../elements/notifications"; -import * as WeakSpot from "../test/weak-spot"; -import * as ActivePage from "../states/active-page"; -import * as TestState from "../test/test-state"; -import * as CompositionState from "../states/composition"; -import * as TestInput from "../test/test-input"; -import * as TestWords from "../test/test-words"; +import * as TestLogic from "../test/test-logic.js"; +import * as TestUI from "../test/test-ui.js"; +import * as TestStats from "../test/test-stats.js"; +import * as Monkey from "../test/monkey.js"; +import Config from "../config.js"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Numbers from "../utils/numbers.js"; +import * as LiveAcc from "../test/live-acc.js"; +import * as LiveBurst from "../test/live-burst.js"; +import * as Funbox from "../test/funbox/funbox.js"; +import * as Sound from "./sound-controller.js"; +import * as Caret from "../test/caret.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as CustomText from "../test/custom-text.js"; +import * as LayoutEmulator from "../test/layout-emulator.js"; +import * as PaceCaret from "../test/pace-caret.js"; +import * as TimerProgress from "../test/timer-progress.js"; +import * as Focus from "../test/focus.js"; +import * as ShiftTracker from "../test/shift-tracker.js"; +import * as Replay from "../test/replay.js"; +import * as MonkeyPower from "../elements/monkey-power.js"; +import * as Notifications from "../elements/notifications.js"; +import * as WeakSpot from "../test/weak-spot.js"; +import * as ActivePage from "../states/active-page.js"; +import * as TestState from "../test/test-state.js"; +import * as CompositionState from "../states/composition.js"; +import * as TestInput from "../test/test-input.js"; +import * as TestWords from "../test/test-words.js"; import * as Hangul from "hangul-js"; -import * as CustomTextState from "../states/custom-text-name"; -import * as FunboxList from "../test/funbox/funbox-list"; -import * as KeymapEvent from "../observables/keymap-event"; -import { IgnoredKeys } from "../constants/ignored-keys"; -import { ModifierKeys } from "../constants/modifier-keys"; -import { navigate } from "./route-controller"; +import * as CustomTextState from "../states/custom-text-name.js"; +import * as FunboxList from "../test/funbox/funbox-list.js"; +import * as KeymapEvent from "../observables/keymap-event.js"; +import { IgnoredKeys } from "../constants/ignored-keys.js"; +import { ModifierKeys } from "../constants/modifier-keys.js"; +import { navigate } from "./route-controller.js"; let dontInsertSpace = false; let correctShiftUsed = true; diff --git a/frontend/src/ts/controllers/page-controller.ts b/frontend/src/ts/controllers/page-controller.ts index db0423113..f75b2cb1b 100644 --- a/frontend/src/ts/controllers/page-controller.ts +++ b/frontend/src/ts/controllers/page-controller.ts @@ -1,18 +1,18 @@ -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as ActivePage from "../states/active-page"; -import * as Settings from "../pages/settings"; -import * as Account from "../pages/account"; -import * as PageTest from "../pages/test"; -import * as PageAbout from "../pages/about"; -import * as PageLogin from "../pages/login"; -import * as PageLoading from "../pages/loading"; -import * as PageProfile from "../pages/profile"; -import * as PageProfileSearch from "../pages/profile-search"; -import * as Page404 from "../pages/404"; -import * as PageTransition from "../states/page-transition"; -import * as AdController from "../controllers/ad-controller"; -import * as Focus from "../test/focus"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as ActivePage from "../states/active-page.js"; +import * as Settings from "../pages/settings.js"; +import * as Account from "../pages/account.js"; +import * as PageTest from "../pages/test.js"; +import * as PageAbout from "../pages/about.js"; +import * as PageLogin from "../pages/login.js"; +import * as PageLoading from "../pages/loading.js"; +import * as PageProfile from "../pages/profile.js"; +import * as PageProfileSearch from "../pages/profile-search.js"; +import * as Page404 from "../pages/404.js"; +import * as PageTransition from "../states/page-transition.js"; +import * as AdController from "../controllers/ad-controller.js"; +import * as Focus from "../test/focus.js"; type ChangeOptions = { force?: boolean; diff --git a/frontend/src/ts/controllers/preset-controller.ts b/frontend/src/ts/controllers/preset-controller.ts index bdbacffbe..40ae94ee0 100644 --- a/frontend/src/ts/controllers/preset-controller.ts +++ b/frontend/src/ts/controllers/preset-controller.ts @@ -1,8 +1,8 @@ -import * as UpdateConfig from "../config"; -import * as DB from "../db"; -import * as Notifications from "../elements/notifications"; -import * as TestLogic from "../test/test-logic"; -import * as TagController from "./tag-controller"; +import * as UpdateConfig from "../config.js"; +import * as DB from "../db.js"; +import * as Notifications from "../elements/notifications.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as TagController from "./tag-controller.js"; export async function apply(_id: string): Promise<void> { const snapshot = DB.getSnapshot(); diff --git a/frontend/src/ts/controllers/profile-search-controller.ts b/frontend/src/ts/controllers/profile-search-controller.ts index f80fb6fa7..23c28faa7 100644 --- a/frontend/src/ts/controllers/profile-search-controller.ts +++ b/frontend/src/ts/controllers/profile-search-controller.ts @@ -1,8 +1,8 @@ -import { InputIndicator } from "../elements/input-indicator"; -import { sleep } from "../utils/misc"; -import Ape from "../ape"; -import { navigate } from "../controllers/route-controller"; -import * as Skeleton from "../utils/skeleton"; +import { InputIndicator } from "../elements/input-indicator.js"; +import { sleep } from "../utils/misc.js"; +import Ape from "../ape.js"; +import { navigate } from "../controllers/route-controller.js"; +import * as Skeleton from "../utils/skeleton.js"; const searchIndicator = new InputIndicator( $(".page.pageProfileSearch .search input"), diff --git a/frontend/src/ts/controllers/pw-ad-controller.ts b/frontend/src/ts/controllers/pw-ad-controller.ts index 6c7f91f5c..196007248 100644 --- a/frontend/src/ts/controllers/pw-ad-controller.ts +++ b/frontend/src/ts/controllers/pw-ad-controller.ts @@ -1,8 +1,8 @@ //@ts-nocheck -import Config from "../config"; -import * as ActivePage from "../states/active-page"; -import * as TestUI from "../test/test-ui"; +import Config from "../config.js"; +import * as ActivePage from "../states/active-page.js"; +import * as TestUI from "../test/test-ui.js"; // Step 1: Create the Ramp Object, NOTE: selector id needed for tagged units only const resultUnits = [ diff --git a/frontend/src/ts/controllers/quotes-controller.ts b/frontend/src/ts/controllers/quotes-controller.ts index 09a63edda..d3f60334d 100644 --- a/frontend/src/ts/controllers/quotes-controller.ts +++ b/frontend/src/ts/controllers/quotes-controller.ts @@ -1,9 +1,9 @@ -import { removeLanguageSize } from "../utils/strings"; -import { randomElementFromArray, shuffle } from "../utils/arrays"; -import { cachedFetchJson } from "../utils/json-data"; -import { subscribe } from "../observables/config-event"; -import * as DB from "../db"; -import Ape from "../ape"; +import { removeLanguageSize } from "../utils/strings.js"; +import { randomElementFromArray, shuffle } from "../utils/arrays.js"; +import { cachedFetchJson } from "../utils/json-data.js"; +import { subscribe } from "../observables/config-event.js"; +import * as DB from "../db.js"; +import Ape from "../ape.js"; type JsonQuote = { text: string; diff --git a/frontend/src/ts/controllers/route-controller.ts b/frontend/src/ts/controllers/route-controller.ts index f87ff87f4..d9bbcf13b 100644 --- a/frontend/src/ts/controllers/route-controller.ts +++ b/frontend/src/ts/controllers/route-controller.ts @@ -1,8 +1,8 @@ -import * as PageController from "./page-controller"; -import * as Leaderboards from "../elements/leaderboards"; -import * as TestUI from "../test/test-ui"; -import * as PageTransition from "../states/page-transition"; -import { Auth, isAuthenticated } from "../firebase"; +import * as PageController from "./page-controller.js"; +import * as Leaderboards from "../elements/leaderboards.js"; +import * as TestUI from "../test/test-ui.js"; +import * as PageTransition from "../states/page-transition.js"; +import { Auth, isAuthenticated } from "../firebase.js"; //source: https://www.youtube.com/watch?v=OstALBk-jTc // https://www.youtube.com/watch?v=OstALBk-jTc diff --git a/frontend/src/ts/controllers/sound-controller.ts b/frontend/src/ts/controllers/sound-controller.ts index 7bcf6f9a8..3c5954118 100644 --- a/frontend/src/ts/controllers/sound-controller.ts +++ b/frontend/src/ts/controllers/sound-controller.ts @@ -1,12 +1,11 @@ -import Config from "../config"; -import * as ConfigEvent from "../observables/config-event"; -import { createErrorMessage } from "../utils/misc"; -import { randomElementFromArray } from "../utils/arrays"; -import { randomIntFromRange } from "../utils/numbers"; -import { leftState, rightState } from "../test/shift-tracker"; -import { capsState } from "../test/caps-warning"; -import * as Notifications from "../elements/notifications"; - +import Config from "../config.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import { createErrorMessage } from "../utils/misc.js"; +import { randomElementFromArray } from "../utils/arrays.js"; +import { randomIntFromRange } from "../utils/numbers.js"; +import { leftState, rightState } from "../test/shift-tracker.js"; +import { capsState } from "../test/caps-warning.js"; +import * as Notifications from "../elements/notifications.js"; import type { Howl } from "howler"; async function gethowler(): Promise<typeof import("howler")> { diff --git a/frontend/src/ts/controllers/tag-controller.ts b/frontend/src/ts/controllers/tag-controller.ts index e934095d5..23ec716da 100644 --- a/frontend/src/ts/controllers/tag-controller.ts +++ b/frontend/src/ts/controllers/tag-controller.ts @@ -1,5 +1,5 @@ -import * as DB from "../db"; -import * as ModesNotice from "../elements/modes-notice"; +import * as DB from "../db.js"; +import * as ModesNotice from "../elements/modes-notice.js"; export function saveActiveToLocalStorage(): void { const tags: string[] = []; diff --git a/frontend/src/ts/controllers/theme-controller.ts b/frontend/src/ts/controllers/theme-controller.ts index dedca718d..00fa25bd8 100644 --- a/frontend/src/ts/controllers/theme-controller.ts +++ b/frontend/src/ts/controllers/theme-controller.ts @@ -1,16 +1,16 @@ -import * as ThemeColors from "../elements/theme-colors"; -import * as ChartController from "./chart-controller"; -import * as Misc from "../utils/misc"; -import * as Arrays from "../utils/arrays"; -import * as JSONData from "../utils/json-data"; -import { isColorDark, isColorLight } from "../utils/colors"; -import Config, { setAutoSwitchTheme } from "../config"; -import * as BackgroundFilter from "../elements/custom-background-filter"; -import * as ConfigEvent from "../observables/config-event"; -import * as DB from "../db"; -import * as Notifications from "../elements/notifications"; -import * as Loader from "../elements/loader"; -import * as AnalyticsController from "../controllers/analytics-controller"; +import * as ThemeColors from "../elements/theme-colors.js"; +import * as ChartController from "./chart-controller.js"; +import * as Misc from "../utils/misc.js"; +import * as Arrays from "../utils/arrays.js"; +import * as JSONData from "../utils/json-data.js"; +import { isColorDark, isColorLight } from "../utils/colors.js"; +import Config, { setAutoSwitchTheme } from "../config.js"; +import * as BackgroundFilter from "../elements/custom-background-filter.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as DB from "../db.js"; +import * as Notifications from "../elements/notifications.js"; +import * as Loader from "../elements/loader.js"; +import * as AnalyticsController from "../controllers/analytics-controller.js"; import { debounce } from "throttle-debounce"; export let randomTheme: string | null = null; diff --git a/frontend/src/ts/db.ts b/frontend/src/ts/db.ts index fce4aae17..091750258 100644 --- a/frontend/src/ts/db.ts +++ b/frontend/src/ts/db.ts @@ -1,19 +1,19 @@ -import Ape from "./ape"; -import * as Notifications from "./elements/notifications"; -import * as LoadingPage from "./pages/loading"; -import DefaultConfig from "./constants/default-config"; -import { isAuthenticated } from "./firebase"; -import { defaultSnap } from "./constants/default-snapshot"; -import * as ConnectionState from "./states/connection"; -import { lastElementFromArray } from "./utils/arrays"; -import { getFunboxList } from "./utils/json-data"; -import { mergeWithDefaultConfig } from "./utils/config"; +import Ape from "./ape.js"; +import * as Notifications from "./elements/notifications.js"; +import * as LoadingPage from "./pages/loading.js"; +import DefaultConfig from "./constants/default-config.js"; +import { isAuthenticated } from "./firebase.js"; +import { defaultSnap } from "./constants/default-snapshot.js"; +import * as ConnectionState from "./states/connection.js"; +import { lastElementFromArray } from "./utils/arrays.js"; +import { getFunboxList } from "./utils/json-data.js"; +import { mergeWithDefaultConfig } from "./utils/config.js"; import * as Dates from "date-fns"; import { TestActivityCalendar, ModifiableTestActivityCalendar, } from "./elements/test-activity-calendar"; -import * as Loader from "./elements/loader"; +import * as Loader from "./elements/loader.js"; let dbSnapshot: MonkeyTypes.Snapshot | undefined; diff --git a/frontend/src/ts/elements/account-button.ts b/frontend/src/ts/elements/account-button.ts index 3174c843a..e2e546342 100644 --- a/frontend/src/ts/elements/account-button.ts +++ b/frontend/src/ts/elements/account-button.ts @@ -1,9 +1,9 @@ -import { getSnapshot } from "../db"; -import { isAuthenticated } from "../firebase"; -import * as Misc from "../utils/misc"; -import * as Levels from "../utils/levels"; -import { getAll } from "./theme-colors"; -import * as SlowTimer from "../states/slow-timer"; +import { getSnapshot } from "../db.js"; +import { isAuthenticated } from "../firebase.js"; +import * as Misc from "../utils/misc.js"; +import * as Levels from "../utils/levels.js"; +import { getAll } from "./theme-colors.js"; +import * as SlowTimer from "../states/slow-timer.js"; let usingAvatar = false; diff --git a/frontend/src/ts/elements/account/mini-result-chart.ts b/frontend/src/ts/elements/account/mini-result-chart.ts index 41fae6a76..8a433c6f3 100644 --- a/frontend/src/ts/elements/account/mini-result-chart.ts +++ b/frontend/src/ts/elements/account/mini-result-chart.ts @@ -1,7 +1,7 @@ -import * as ChartController from "../../controllers/chart-controller"; -import Config from "../../config"; -import * as Misc from "../../utils/misc"; -import * as Arrays from "../../utils/arrays"; +import * as ChartController from "../../controllers/chart-controller.js"; +import Config from "../../config.js"; +import * as Misc from "../../utils/misc.js"; +import * as Arrays from "../../utils/arrays.js"; export function updatePosition(x: number, y: number): void { $(".pageAccount .miniResultChartWrapper").css({ top: y, left: x }); diff --git a/frontend/src/ts/elements/account/pb-tables.ts b/frontend/src/ts/elements/account/pb-tables.ts index 54bab58be..caee93bb0 100644 --- a/frontend/src/ts/elements/account/pb-tables.ts +++ b/frontend/src/ts/elements/account/pb-tables.ts @@ -1,6 +1,6 @@ -import Config from "../../config"; +import Config from "../../config.js"; import { format as dateFormat } from "date-fns/format"; -import Format from "../../utils/format"; +import Format from "../../utils/format.js"; function clearTables(isProfile: boolean): void { const source = isProfile ? "Profile" : "Account"; diff --git a/frontend/src/ts/elements/account/result-filters.ts b/frontend/src/ts/elements/account/result-filters.ts index 7d627f4be..9e6b035b0 100644 --- a/frontend/src/ts/elements/account/result-filters.ts +++ b/frontend/src/ts/elements/account/result-filters.ts @@ -1,11 +1,11 @@ -import * as Misc from "../../utils/misc"; -import * as Strings from "../../utils/strings"; -import * as JSONData from "../../utils/json-data"; -import * as DB from "../../db"; -import Config from "../../config"; -import * as Notifications from "../notifications"; -import Ape from "../../ape/index"; -import * as Loader from "../loader"; +import * as Misc from "../../utils/misc.js"; +import * as Strings from "../../utils/strings.js"; +import * as JSONData from "../../utils/json-data.js"; +import * as DB from "../../db.js"; +import Config from "../../config.js"; +import * as Notifications from "../notifications.js"; +import Ape from "../../ape/index.js"; +import * as Loader from "../loader.js"; import SlimSelect from "slim-select"; type Option = { diff --git a/frontend/src/ts/elements/alerts.ts b/frontend/src/ts/elements/alerts.ts index b86458376..b145bebee 100644 --- a/frontend/src/ts/elements/alerts.ts +++ b/frontend/src/ts/elements/alerts.ts @@ -1,15 +1,15 @@ import { formatDistanceToNowStrict } from "date-fns/formatDistanceToNowStrict"; -import Ape from "../ape"; -import { isAuthenticated } from "../firebase"; -import * as AccountButton from "../elements/account-button"; -import * as DB from "../db"; -import * as NotificationEvent from "../observables/notification-event"; -import * as BadgeController from "../controllers/badge-controller"; -import * as Notifications from "../elements/notifications"; -import * as ConnectionState from "../states/connection"; -import { escapeHTML } from "../utils/misc"; -import AnimatedModal from "../utils/animated-modal"; -import { updateXp as accountPageUpdateProfile } from "./profile"; +import Ape from "../ape.js"; +import { isAuthenticated } from "../firebase.js"; +import * as AccountButton from "../elements/account-button.js"; +import * as DB from "../db.js"; +import * as NotificationEvent from "../observables/notification-event.js"; +import * as BadgeController from "../controllers/badge-controller.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ConnectionState from "../states/connection.js"; +import { escapeHTML } from "../utils/misc.js"; +import AnimatedModal from "../utils/animated-modal.js"; +import { updateXp as accountPageUpdateProfile } from "./profile.js"; let accountAlerts: MonkeyTypes.MonkeyMail[] = []; let maxMail = 0; diff --git a/frontend/src/ts/elements/custom-background-filter.ts b/frontend/src/ts/elements/custom-background-filter.ts index 9698e3788..8416c0e5e 100644 --- a/frontend/src/ts/elements/custom-background-filter.ts +++ b/frontend/src/ts/elements/custom-background-filter.ts @@ -1,5 +1,5 @@ -import * as UpdateConfig from "../config"; -import * as ConfigEvent from "../observables/config-event"; +import * as UpdateConfig from "../config.js"; +import * as ConfigEvent from "../observables/config-event.js"; import { debounce } from "throttle-debounce"; const filters = { diff --git a/frontend/src/ts/elements/fps-counter.ts b/frontend/src/ts/elements/fps-counter.ts index 994fce9c5..a394bba72 100644 --- a/frontend/src/ts/elements/fps-counter.ts +++ b/frontend/src/ts/elements/fps-counter.ts @@ -1,4 +1,4 @@ -import { roundTo2 } from "../utils/numbers"; +import { roundTo2 } from "../utils/numbers.js"; let frameCount = 0; let fpsInterval: number; diff --git a/frontend/src/ts/elements/keymap.ts b/frontend/src/ts/elements/keymap.ts index 49988d83c..6844f5d55 100644 --- a/frontend/src/ts/elements/keymap.ts +++ b/frontend/src/ts/elements/keymap.ts @@ -1,14 +1,14 @@ -import Config from "../config"; -import * as ThemeColors from "./theme-colors"; -import * as SlowTimer from "../states/slow-timer"; -import * as ConfigEvent from "../observables/config-event"; -import * as KeymapEvent from "../observables/keymap-event"; -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; +import Config from "../config.js"; +import * as ThemeColors from "./theme-colors.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as KeymapEvent from "../observables/keymap-event.js"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; import * as Hangul from "hangul-js"; -import * as Notifications from "../elements/notifications"; -import * as ActivePage from "../states/active-page"; -import * as TestWords from "../test/test-words"; +import * as Notifications from "../elements/notifications.js"; +import * as ActivePage from "../states/active-page.js"; +import * as TestWords from "../test/test-words.js"; const stenoKeys: MonkeyTypes.Layout = { keymapShowTopRow: true, diff --git a/frontend/src/ts/elements/last-10-average.ts b/frontend/src/ts/elements/last-10-average.ts index fb5087669..20c47e9e1 100644 --- a/frontend/src/ts/elements/last-10-average.ts +++ b/frontend/src/ts/elements/last-10-average.ts @@ -1,8 +1,8 @@ -import * as DB from "../db"; -import * as Misc from "../utils/misc"; -import * as Numbers from "../utils/numbers"; -import Config from "../config"; -import * as TestWords from "../test/test-words"; +import * as DB from "../db.js"; +import * as Misc from "../utils/misc.js"; +import * as Numbers from "../utils/numbers.js"; +import Config from "../config.js"; +import * as TestWords from "../test/test-words.js"; let averageWPM = 0; let averageAcc = 0; diff --git a/frontend/src/ts/elements/leaderboards.ts b/frontend/src/ts/elements/leaderboards.ts index 56aeb8260..5f6e7bb9e 100644 --- a/frontend/src/ts/elements/leaderboards.ts +++ b/frontend/src/ts/elements/leaderboards.ts @@ -1,21 +1,21 @@ -import Ape from "../ape"; -import * as DB from "../db"; -import Config from "../config"; -import * as DateTime from "../utils/date-and-time"; -import * as Misc from "../utils/misc"; -import * as Arrays from "../utils/arrays"; -import * as Numbers from "../utils/numbers"; -import * as Notifications from "./notifications"; +import Ape from "../ape.js"; +import * as DB from "../db.js"; +import Config from "../config.js"; +import * as DateTime from "../utils/date-and-time.js"; +import * as Misc from "../utils/misc.js"; +import * as Arrays from "../utils/arrays.js"; +import * as Numbers from "../utils/numbers.js"; +import * as Notifications from "./notifications.js"; import { format } from "date-fns/format"; -import { isAuthenticated } from "../firebase"; +import { isAuthenticated } from "../firebase.js"; import { differenceInSeconds } from "date-fns/differenceInSeconds"; -import { getHTMLById as getBadgeHTMLbyId } from "../controllers/badge-controller"; -import * as ConnectionState from "../states/connection"; -import * as Skeleton from "../utils/skeleton"; +import { getHTMLById as getBadgeHTMLbyId } from "../controllers/badge-controller.js"; +import * as ConnectionState from "../states/connection.js"; +import * as Skeleton from "../utils/skeleton.js"; import { debounce } from "throttle-debounce"; -import Format from "../utils/format"; +import Format from "../utils/format.js"; import SlimSelect from "slim-select"; -import { getHtmlByUserFlags } from "../controllers/user-flag-controller"; +import { getHtmlByUserFlags } from "../controllers/user-flag-controller.js"; const wrapperId = "leaderboardsWrapper"; diff --git a/frontend/src/ts/elements/modes-notice.ts b/frontend/src/ts/elements/modes-notice.ts index 4456dbc10..52b609a31 100644 --- a/frontend/src/ts/elements/modes-notice.ts +++ b/frontend/src/ts/elements/modes-notice.ts @@ -1,14 +1,14 @@ -import * as PaceCaret from "../test/pace-caret"; -import * as TestState from "../test/test-state"; -import * as DB from "../db"; -import * as Last10Average from "../elements/last-10-average"; -import Config from "../config"; -import * as TestWords from "../test/test-words"; -import * as ConfigEvent from "../observables/config-event"; -import { isAuthenticated } from "../firebase"; -import * as CustomTextState from "../states/custom-text-name"; -import { getLanguageDisplayString } from "../utils/strings"; -import Format from "../utils/format"; +import * as PaceCaret from "../test/pace-caret.js"; +import * as TestState from "../test/test-state.js"; +import * as DB from "../db.js"; +import * as Last10Average from "../elements/last-10-average.js"; +import Config from "../config.js"; +import * as TestWords from "../test/test-words.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import { isAuthenticated } from "../firebase.js"; +import * as CustomTextState from "../states/custom-text-name.js"; +import { getLanguageDisplayString } from "../utils/strings.js"; +import Format from "../utils/format.js"; ConfigEvent.subscribe((eventKey) => { if ( diff --git a/frontend/src/ts/elements/monkey-power.ts b/frontend/src/ts/elements/monkey-power.ts index 2b8bf9bd8..4f723cb26 100644 --- a/frontend/src/ts/elements/monkey-power.ts +++ b/frontend/src/ts/elements/monkey-power.ts @@ -1,6 +1,6 @@ -import * as ThemeColors from "./theme-colors"; -import * as SlowTimer from "../states/slow-timer"; -import Config from "../config"; +import * as ThemeColors from "./theme-colors.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import Config from "../config.js"; type Particle = { x: number; diff --git a/frontend/src/ts/elements/no-css.ts b/frontend/src/ts/elements/no-css.ts index 5f24ce633..b4a528141 100644 --- a/frontend/src/ts/elements/no-css.ts +++ b/frontend/src/ts/elements/no-css.ts @@ -1,4 +1,4 @@ -import { envConfig } from "../constants/env-config"; +import { envConfig } from "../constants/env-config.js"; $("#nocss .requestedStylesheets").html( "Requested stylesheets:<br>" + diff --git a/frontend/src/ts/elements/notifications.ts b/frontend/src/ts/elements/notifications.ts index 49af00944..ce629af3f 100644 --- a/frontend/src/ts/elements/notifications.ts +++ b/frontend/src/ts/elements/notifications.ts @@ -1,9 +1,9 @@ import { debounce } from "throttle-debounce"; -import * as Misc from "../utils/misc"; -import * as Numbers from "../utils/numbers"; -import * as BannerEvent from "../observables/banner-event"; -// import * as Alerts from "./alerts"; -import * as NotificationEvent from "../observables/notification-event"; +import * as Misc from "../utils/misc.js"; +import * as Numbers from "../utils/numbers.js"; +import * as BannerEvent from "../observables/banner-event.js"; +// import * as Alerts from "./alerts.js"; +import * as NotificationEvent from "../observables/notification-event.js"; function updateMargin(): void { const height = $("#bannerCenter").height() as number; diff --git a/frontend/src/ts/elements/profile.ts b/frontend/src/ts/elements/profile.ts index b5fd6298c..4495f3e05 100644 --- a/frontend/src/ts/elements/profile.ts +++ b/frontend/src/ts/elements/profile.ts @@ -1,16 +1,16 @@ -import * as DB from "../db"; +import * as DB from "../db.js"; import { format } from "date-fns/format"; import { differenceInDays } from "date-fns/differenceInDays"; -import * as Misc from "../utils/misc"; -import * as Numbers from "../utils/numbers"; -import * as Levels from "../utils/levels"; -import * as DateTime from "../utils/date-and-time"; -import { getHTMLById } from "../controllers/badge-controller"; +import * as Misc from "../utils/misc.js"; +import * as Numbers from "../utils/numbers.js"; +import * as Levels from "../utils/levels.js"; +import * as DateTime from "../utils/date-and-time.js"; +import { getHTMLById } from "../controllers/badge-controller.js"; import { throttle } from "throttle-debounce"; -import * as ActivePage from "../states/active-page"; +import * as ActivePage from "../states/active-page.js"; import { formatDistanceToNowStrict } from "date-fns/formatDistanceToNowStrict"; -import { getHtmlByUserFlags } from "../controllers/user-flag-controller"; -import Format from "../utils/format"; +import { getHtmlByUserFlags } from "../controllers/user-flag-controller.js"; +import Format from "../utils/format.js"; type ProfileViewPaths = "profile" | "account"; type UserProfileOrSnapshot = SharedTypes.UserProfile | MonkeyTypes.Snapshot; diff --git a/frontend/src/ts/elements/psa.ts b/frontend/src/ts/elements/psa.ts index 023514d4d..7504be9d9 100644 --- a/frontend/src/ts/elements/psa.ts +++ b/frontend/src/ts/elements/psa.ts @@ -1,9 +1,9 @@ -import Ape from "../ape"; -import { isDevEnvironment } from "../utils/misc"; -import { secondsToString } from "../utils/date-and-time"; -import * as Notifications from "./notifications"; +import Ape from "../ape.js"; +import { isDevEnvironment } from "../utils/misc.js"; +import { secondsToString } from "../utils/date-and-time.js"; +import * as Notifications from "./notifications.js"; import { format } from "date-fns/format"; -import * as Alerts from "./alerts"; +import * as Alerts from "./alerts.js"; function clearMemory(): void { window.localStorage.setItem("confirmedPSAs", JSON.stringify([])); diff --git a/frontend/src/ts/elements/result-batches.ts b/frontend/src/ts/elements/result-batches.ts index 9a2c20c66..774e6550d 100644 --- a/frontend/src/ts/elements/result-batches.ts +++ b/frontend/src/ts/elements/result-batches.ts @@ -1,8 +1,8 @@ -import * as DB from "../db"; -import * as ServerConfiguration from "../ape/server-configuration"; -import { mapRange } from "../utils/misc"; -import { blendTwoHexColors } from "../utils/colors"; -import * as ThemeColors from "../elements/theme-colors"; +import * as DB from "../db.js"; +import * as ServerConfiguration from "../ape/server-configuration.js"; +import { mapRange } from "../utils/misc.js"; +import { blendTwoHexColors } from "../utils/colors.js"; +import * as ThemeColors from "../elements/theme-colors.js"; export function hide(): void { $(".pageAccount .resultBatches").addClass("hidden"); diff --git a/frontend/src/ts/elements/result-word-highlight.ts b/frontend/src/ts/elements/result-word-highlight.ts index 95aedd773..b845bdb78 100644 --- a/frontend/src/ts/elements/result-word-highlight.ts +++ b/frontend/src/ts/elements/result-word-highlight.ts @@ -3,9 +3,9 @@ // to place a highlight (".highlight") on top of the text to be highlighted. // Constants for padding around the highlights -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import Config from "../config"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import Config from "../config.js"; const PADDING_X = 16; const PADDING_Y = 12; diff --git a/frontend/src/ts/elements/scroll-to-top.ts b/frontend/src/ts/elements/scroll-to-top.ts index b9d2e5f47..5dc957834 100644 --- a/frontend/src/ts/elements/scroll-to-top.ts +++ b/frontend/src/ts/elements/scroll-to-top.ts @@ -1,4 +1,4 @@ -import * as ActivePage from "../states/active-page"; +import * as ActivePage from "../states/active-page.js"; let visible = false; diff --git a/frontend/src/ts/elements/settings/settings-group.ts b/frontend/src/ts/elements/settings/settings-group.ts index cefb61e46..97517bba1 100644 --- a/frontend/src/ts/elements/settings/settings-group.ts +++ b/frontend/src/ts/elements/settings/settings-group.ts @@ -1,5 +1,5 @@ -import Config from "../../config"; -import * as Notifications from "../notifications"; +import Config from "../../config.js"; +import * as Notifications from "../notifications.js"; import SlimSelect from "slim-select"; export default class SettingsGroup<T extends SharedTypes.ConfigValue> { diff --git a/frontend/src/ts/elements/settings/theme-picker.ts b/frontend/src/ts/elements/settings/theme-picker.ts index 1cc0bfcae..752654fdc 100644 --- a/frontend/src/ts/elements/settings/theme-picker.ts +++ b/frontend/src/ts/elements/settings/theme-picker.ts @@ -1,16 +1,16 @@ -import Config, * as UpdateConfig from "../../config"; -import * as ThemeController from "../../controllers/theme-controller"; -import * as Misc from "../../utils/misc"; -import * as JSONData from "../../utils/json-data"; -import * as Colors from "../../utils/colors"; -import * as Notifications from "../notifications"; -import * as ThemeColors from "../theme-colors"; -import * as ChartController from "../../controllers/chart-controller"; -import * as Loader from "../loader"; -import * as DB from "../../db"; -import * as ConfigEvent from "../../observables/config-event"; -import { isAuthenticated } from "../../firebase"; -import * as ActivePage from "../../states/active-page"; +import Config, * as UpdateConfig from "../../config.js"; +import * as ThemeController from "../../controllers/theme-controller.js"; +import * as Misc from "../../utils/misc.js"; +import * as JSONData from "../../utils/json-data.js"; +import * as Colors from "../../utils/colors.js"; +import * as Notifications from "../notifications.js"; +import * as ThemeColors from "../theme-colors.js"; +import * as ChartController from "../../controllers/chart-controller.js"; +import * as Loader from "../loader.js"; +import * as DB from "../../db.js"; +import * as ConfigEvent from "../../observables/config-event.js"; +import { isAuthenticated } from "../../firebase.js"; +import * as ActivePage from "../../states/active-page.js"; function updateActiveButton(): void { let activeThemeName = Config.theme; diff --git a/frontend/src/ts/elements/sign-in-out-button.ts b/frontend/src/ts/elements/sign-in-out-button.ts index 90ae02e03..8d1b3eed8 100644 --- a/frontend/src/ts/elements/sign-in-out-button.ts +++ b/frontend/src/ts/elements/sign-in-out-button.ts @@ -1,4 +1,4 @@ -import { Auth, isAuthenticated } from "../firebase"; +import { Auth, isAuthenticated } from "../firebase.js"; const el = $("header .signInOut"); diff --git a/frontend/src/ts/elements/test-activity.ts b/frontend/src/ts/elements/test-activity.ts index 398873c51..372fd559a 100644 --- a/frontend/src/ts/elements/test-activity.ts +++ b/frontend/src/ts/elements/test-activity.ts @@ -1,8 +1,8 @@ import SlimSelect from "slim-select"; import type { DataObjectPartial } from "slim-select/dist/store"; -import { getTestActivityCalendar } from "../db"; -import * as ServerConfiguration from "../ape/server-configuration"; -import * as DB from "../db"; +import { getTestActivityCalendar } from "../db.js"; +import * as ServerConfiguration from "../ape/server-configuration.js"; +import * as DB from "../db.js"; let yearSelector: SlimSelect | undefined = undefined; diff --git a/frontend/src/ts/elements/version-button.ts b/frontend/src/ts/elements/version-button.ts index 752758ff5..74282efcb 100644 --- a/frontend/src/ts/elements/version-button.ts +++ b/frontend/src/ts/elements/version-button.ts @@ -1,5 +1,5 @@ -import { isDevEnvironment } from "../utils/misc"; -import * as Version from "../states/version"; +import { isDevEnvironment } from "../utils/misc.js"; +import * as Version from "../states/version.js"; function setText(text: string): void { $("footer .currentVersion .text").text(text); diff --git a/frontend/src/ts/event-handlers/about.ts b/frontend/src/ts/event-handlers/about.ts index d1c66c86a..a3ec462dd 100644 --- a/frontend/src/ts/event-handlers/about.ts +++ b/frontend/src/ts/event-handlers/about.ts @@ -1,5 +1,5 @@ -import * as SupportPopup from "../modals/support"; -import * as ContactModal from "../modals/contact"; +import * as SupportPopup from "../modals/support.js"; +import * as ContactModal from "../modals/contact.js"; document .querySelector("#pageAbout #supportMeAboutButton") diff --git a/frontend/src/ts/event-handlers/account.ts b/frontend/src/ts/event-handlers/account.ts index ccb9ee0a9..4e24b6961 100644 --- a/frontend/src/ts/event-handlers/account.ts +++ b/frontend/src/ts/event-handlers/account.ts @@ -1,10 +1,10 @@ -import * as PbTablesModal from "../modals/pb-tables"; -import * as EditProfileModal from "../modals/edit-profile"; -import { getSnapshot } from "../db"; -import { isAuthenticated } from "../firebase"; -import * as Notifications from "../elements/notifications"; -import * as EditResultTagsModal from "../modals/edit-result-tags"; -import * as AddFilterPresetModal from "../modals/new-filter-preset"; +import * as PbTablesModal from "../modals/pb-tables.js"; +import * as EditProfileModal from "../modals/edit-profile.js"; +import { getSnapshot } from "../db.js"; +import { isAuthenticated } from "../firebase.js"; +import * as Notifications from "../elements/notifications.js"; +import * as EditResultTagsModal from "../modals/edit-result-tags.js"; +import * as AddFilterPresetModal from "../modals/new-filter-preset.js"; const accountPage = document.querySelector("#pageAccount") as HTMLElement; diff --git a/frontend/src/ts/event-handlers/footer.ts b/frontend/src/ts/event-handlers/footer.ts index 3161d9451..052bf0db8 100644 --- a/frontend/src/ts/event-handlers/footer.ts +++ b/frontend/src/ts/event-handlers/footer.ts @@ -1,12 +1,12 @@ -import Config, * as UpdateConfig from "../config"; -import { isAuthenticated } from "../firebase"; -import * as DB from "../db"; -import * as Notifications from "../elements/notifications"; -import { getCommandline } from "../utils/async-modules"; -import * as SupportPopup from "../modals/support"; -import * as ContactModal from "../modals/contact"; -import * as VersionHistoryModal from "../modals/version-history"; -import { envConfig } from "../constants/env-config"; +import Config, * as UpdateConfig from "../config.js"; +import { isAuthenticated } from "../firebase.js"; +import * as DB from "../db.js"; +import * as Notifications from "../elements/notifications.js"; +import { getCommandline } from "../utils/async-modules.js"; +import * as SupportPopup from "../modals/support.js"; +import * as ContactModal from "../modals/contact.js"; +import * as VersionHistoryModal from "../modals/version-history.js"; +import { envConfig } from "../constants/env-config.js"; document .querySelector("footer #commandLineMobileButton") diff --git a/frontend/src/ts/event-handlers/global.ts b/frontend/src/ts/event-handlers/global.ts index 89fa88516..698b3c0d5 100644 --- a/frontend/src/ts/event-handlers/global.ts +++ b/frontend/src/ts/event-handlers/global.ts @@ -1,10 +1,10 @@ -import * as Misc from "../utils/misc"; -import * as PageTransition from "../states/page-transition"; -import Config from "../config"; -import * as TestWords from "../test/test-words"; -import { getCommandline } from "../utils/async-modules"; -import { log } from "../controllers/analytics-controller"; -import * as Notifications from "../elements/notifications"; +import * as Misc from "../utils/misc.js"; +import * as PageTransition from "../states/page-transition.js"; +import Config from "../config.js"; +import * as TestWords from "../test/test-words.js"; +import { getCommandline } from "../utils/async-modules.js"; +import { log } from "../controllers/analytics-controller.js"; +import * as Notifications from "../elements/notifications.js"; document.addEventListener("keydown", async (e) => { if (PageTransition.get()) return; diff --git a/frontend/src/ts/event-handlers/keymap.ts b/frontend/src/ts/event-handlers/keymap.ts index e88b2aa4c..5a672ccb1 100644 --- a/frontend/src/ts/event-handlers/keymap.ts +++ b/frontend/src/ts/event-handlers/keymap.ts @@ -1,4 +1,4 @@ -import { getCommandline } from "../utils/async-modules"; +import { getCommandline } from "../utils/async-modules.js"; $("#keymap").on("click", ".r5 .keySpace", async () => { (await getCommandline()).show({ diff --git a/frontend/src/ts/event-handlers/settings.ts b/frontend/src/ts/event-handlers/settings.ts index a97704725..a8e7b7715 100644 --- a/frontend/src/ts/event-handlers/settings.ts +++ b/frontend/src/ts/event-handlers/settings.ts @@ -1,11 +1,11 @@ -import * as ShareCustomThemeModal from "../modals/share-custom-theme"; -import * as CookiesModal from "../modals/cookies"; -import * as StreakHourOffsetModal from "../modals/streak-hour-offset"; -import * as EditPresetPopup from "../modals/edit-preset"; -import * as EditTagPopup from "../modals/edit-tag"; -import * as ApeKeysModal from "../modals/ape-keys"; +import * as ShareCustomThemeModal from "../modals/share-custom-theme.js"; +import * as CookiesModal from "../modals/cookies.js"; +import * as StreakHourOffsetModal from "../modals/streak-hour-offset.js"; +import * as EditPresetPopup from "../modals/edit-preset.js"; +import * as EditTagPopup from "../modals/edit-tag.js"; +import * as ApeKeysModal from "../modals/ape-keys.js"; -import * as Notifications from "../elements/notifications"; +import * as Notifications from "../elements/notifications.js"; const settingsPage = document.querySelector("#pageSettings"); diff --git a/frontend/src/ts/event-handlers/test.ts b/frontend/src/ts/event-handlers/test.ts index f8b10b42e..01dc4b1e2 100644 --- a/frontend/src/ts/event-handlers/test.ts +++ b/frontend/src/ts/event-handlers/test.ts @@ -1,15 +1,15 @@ -import { getCommandline } from "../utils/async-modules"; -import * as CustomWordAmount from "../modals/custom-word-amount"; -import * as DB from "../db"; -import * as EditResultTagsModal from "../modals/edit-result-tags"; -import * as MobileTestConfigModal from "../modals/mobile-test-config"; -import * as CustomTestDurationModal from "../modals/custom-test-duration"; -import * as TestWords from "../test/test-words"; -import * as Notifications from "../elements/notifications"; -import * as QuoteRateModal from "../modals/quote-rate"; -import * as QuoteReportModal from "../modals/quote-report"; -import * as QuoteSearchModal from "../modals/quote-search"; -import * as CustomTextModal from "../modals/custom-text"; +import { getCommandline } from "../utils/async-modules.js"; +import * as CustomWordAmount from "../modals/custom-word-amount.js"; +import * as DB from "../db.js"; +import * as EditResultTagsModal from "../modals/edit-result-tags.js"; +import * as MobileTestConfigModal from "../modals/mobile-test-config.js"; +import * as CustomTestDurationModal from "../modals/custom-test-duration.js"; +import * as TestWords from "../test/test-words.js"; +import * as Notifications from "../elements/notifications.js"; +import * as QuoteRateModal from "../modals/quote-rate.js"; +import * as QuoteReportModal from "../modals/quote-report.js"; +import * as QuoteSearchModal from "../modals/quote-search.js"; +import * as CustomTextModal from "../modals/custom-text.js"; $(".pageTest").on("click", "#testModesNotice .textButton", async (event) => { const attr = $(event.currentTarget).attr("commands"); diff --git a/frontend/src/ts/firebase.ts b/frontend/src/ts/firebase.ts index 4f4912dd9..96c1b411f 100644 --- a/frontend/src/ts/firebase.ts +++ b/frontend/src/ts/firebase.ts @@ -4,9 +4,9 @@ import { getAuth, Auth as AuthType, User } from "firebase/auth"; // eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error //@ts-ignore // eslint-disable-next-line import/no-unresolved -import { firebaseConfig } from "./constants/firebase-config"; -import * as Notifications from "./elements/notifications"; -import { createErrorMessage, isDevEnvironment } from "./utils/misc"; +import { firebaseConfig } from "./constants/firebase-config.js"; +import * as Notifications from "./elements/notifications.js"; +import { createErrorMessage, isDevEnvironment } from "./utils/misc.js"; // Initialize Firebase export let app: FirebaseApp | undefined; diff --git a/frontend/src/ts/index.ts b/frontend/src/ts/index.ts index 73c8060bf..57265a178 100644 --- a/frontend/src/ts/index.ts +++ b/frontend/src/ts/index.ts @@ -2,47 +2,47 @@ import "jquery-color"; import "jquery.easing"; -import "./event-handlers/global"; -import "./event-handlers/footer"; -import "./event-handlers/keymap"; -import "./event-handlers/test"; -import "./event-handlers/about"; -import "./event-handlers/settings"; -import "./event-handlers/account"; +import "./event-handlers/global.js"; +import "./event-handlers/footer.js"; +import "./event-handlers/keymap.js"; +import "./event-handlers/test.js"; +import "./event-handlers/about.js"; +import "./event-handlers/settings.js"; +import "./event-handlers/account.js"; -import "./modals/google-sign-up"; +import "./modals/google-sign-up.js"; -import "./firebase"; -import * as Logger from "./utils/logger"; -import * as DB from "./db"; -import "./ui"; -import "./controllers/ad-controller"; -import Config, { loadFromLocalStorage } from "./config"; -import * as TestStats from "./test/test-stats"; -import * as Replay from "./test/replay"; -import * as TestTimer from "./test/test-timer"; -import * as Result from "./test/result"; -import "./controllers/account-controller"; -import { enable } from "./states/glarses-mode"; -import "./test/caps-warning"; -import "./modals/simple-modals"; -import "./controllers/input-controller"; -import "./ready"; -import "./controllers/route-controller"; -import "./pages/about"; -import "./elements/scroll-to-top"; -import * as Account from "./pages/account"; -import "./elements/leaderboards"; -import "./elements/no-css"; -import { egVideoListener } from "./popups/video-ad-popup"; -import "./states/connection"; -import "./test/tts"; -import "./elements/fps-counter"; -import "./controllers/profile-search-controller"; -import { isDevEnvironment } from "./utils/misc"; -import * as VersionButton from "./elements/version-button"; -import * as Focus from "./test/focus"; -import { getDevOptionsModal } from "./utils/async-modules"; +import "./firebase.js"; +import * as Logger from "./utils/logger.js"; +import * as DB from "./db.js"; +import "./ui.js"; +import "./controllers/ad-controller.js"; +import Config, { loadFromLocalStorage } from "./config.js"; +import * as TestStats from "./test/test-stats.js"; +import * as Replay from "./test/replay.js"; +import * as TestTimer from "./test/test-timer.js"; +import * as Result from "./test/result.js"; +import "./controllers/account-controller.js"; +import { enable } from "./states/glarses-mode.js"; +import "./test/caps-warning.js"; +import "./modals/simple-modals.js"; +import "./controllers/input-controller.js"; +import "./ready.js"; +import "./controllers/route-controller.js"; +import "./pages/about.js"; +import "./elements/scroll-to-top.js"; +import * as Account from "./pages/account.js"; +import "./elements/leaderboards.js"; +import "./elements/no-css.js"; +import { egVideoListener } from "./popups/video-ad-popup.js"; +import "./states/connection.js"; +import "./test/tts.js"; +import "./elements/fps-counter.js"; +import "./controllers/profile-search-controller.js"; +import { isDevEnvironment } from "./utils/misc.js"; +import * as VersionButton from "./elements/version-button.js"; +import * as Focus from "./test/focus.js"; +import { getDevOptionsModal } from "./utils/async-modules.js"; function addToGlobal(items: Record<string, unknown>): void { for (const [name, item] of Object.entries(items)) { diff --git a/frontend/src/ts/modals/ape-keys.ts b/frontend/src/ts/modals/ape-keys.ts index 9c3358ada..635e2fac3 100644 --- a/frontend/src/ts/modals/ape-keys.ts +++ b/frontend/src/ts/modals/ape-keys.ts @@ -1,10 +1,10 @@ -import Ape from "../ape"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; +import Ape from "../ape.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; import { format } from "date-fns/format"; -import * as ConnectionState from "../states/connection"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import { showPopup } from "./simple-modals"; +import * as ConnectionState from "../states/connection.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import { showPopup } from "./simple-modals.js"; let apeKeys: Ape.ApeKeys.GetApeKeys | null = {}; diff --git a/frontend/src/ts/modals/contact.ts b/frontend/src/ts/modals/contact.ts index 8d808ee84..0c2380eb5 100644 --- a/frontend/src/ts/modals/contact.ts +++ b/frontend/src/ts/modals/contact.ts @@ -1,4 +1,4 @@ -import AnimatedModal from "../utils/animated-modal"; +import AnimatedModal from "../utils/animated-modal.js"; export function show(): void { void modal.show(); diff --git a/frontend/src/ts/modals/cookies.ts b/frontend/src/ts/modals/cookies.ts index 879730dca..41a322bca 100644 --- a/frontend/src/ts/modals/cookies.ts +++ b/frontend/src/ts/modals/cookies.ts @@ -1,9 +1,9 @@ -import { activateAnalytics } from "../controllers/analytics-controller"; -import * as Notifications from "../elements/notifications"; -import { isPopupVisible } from "../utils/misc"; -import * as AdController from "../controllers/ad-controller"; -import AnimatedModal from "../utils/animated-modal"; -import { focusWords } from "../test/test-ui"; +import { activateAnalytics } from "../controllers/analytics-controller.js"; +import * as Notifications from "../elements/notifications.js"; +import { isPopupVisible } from "../utils/misc.js"; +import * as AdController from "../controllers/ad-controller.js"; +import AnimatedModal from "../utils/animated-modal.js"; +import { focusWords } from "../test/test-ui.js"; type Accepted = { security: boolean; diff --git a/frontend/src/ts/modals/custom-test-duration.ts b/frontend/src/ts/modals/custom-test-duration.ts index 4f44a94f5..3d2c72405 100644 --- a/frontend/src/ts/modals/custom-test-duration.ts +++ b/frontend/src/ts/modals/custom-test-duration.ts @@ -1,8 +1,8 @@ -import Config, * as UpdateConfig from "../config"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as TestLogic from "../test/test-logic"; -import * as Notifications from "../elements/notifications"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import Config, * as UpdateConfig from "../config.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as Notifications from "../elements/notifications.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; function parseInput(input: string): number { const re = /((-\s*)?\d+(\.\d+)?\s*[hms]?)/g; diff --git a/frontend/src/ts/modals/custom-text.ts b/frontend/src/ts/modals/custom-text.ts index b72d31674..4a708bb9f 100644 --- a/frontend/src/ts/modals/custom-text.ts +++ b/frontend/src/ts/modals/custom-text.ts @@ -1,15 +1,15 @@ -import * as CustomText from "../test/custom-text"; -import * as CustomTextState from "../states/custom-text-name"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as TestLogic from "../test/test-logic"; -import * as ChallengeController from "../controllers/challenge-controller"; -import Config, * as UpdateConfig from "../config"; -import * as Strings from "../utils/strings"; -import * as WordFilterPopup from "./word-filter"; -import * as Notifications from "../elements/notifications"; -import * as SavedTextsPopup from "./saved-texts"; -import * as SaveCustomTextPopup from "./save-custom-text"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import * as CustomText from "../test/custom-text.js"; +import * as CustomTextState from "../states/custom-text-name.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as ChallengeController from "../controllers/challenge-controller.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as Strings from "../utils/strings.js"; +import * as WordFilterPopup from "./word-filter.js"; +import * as Notifications from "../elements/notifications.js"; +import * as SavedTextsPopup from "./saved-texts.js"; +import * as SaveCustomTextPopup from "./save-custom-text.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; const popup = "#customTextModal .modal"; diff --git a/frontend/src/ts/modals/custom-word-amount.ts b/frontend/src/ts/modals/custom-word-amount.ts index e325ed6b4..750b99a0b 100644 --- a/frontend/src/ts/modals/custom-word-amount.ts +++ b/frontend/src/ts/modals/custom-word-amount.ts @@ -1,8 +1,8 @@ -import Config, * as UpdateConfig from "../config"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as TestLogic from "../test/test-logic"; -import * as Notifications from "../elements/notifications"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import Config, * as UpdateConfig from "../config.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as Notifications from "../elements/notifications.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; export function show(showOptions?: ShowOptions): void { void modal.show({ diff --git a/frontend/src/ts/modals/dev-options.ts b/frontend/src/ts/modals/dev-options.ts index 646961a65..25bca49e0 100644 --- a/frontend/src/ts/modals/dev-options.ts +++ b/frontend/src/ts/modals/dev-options.ts @@ -1,8 +1,8 @@ -import { envConfig } from "../constants/env-config"; -import AnimatedModal from "../utils/animated-modal"; -import { showPopup } from "./simple-modals"; -import * as Notifications from "../elements/notifications"; -import { setMediaQueryDebugLevel } from "../ui"; +import { envConfig } from "../constants/env-config.js"; +import AnimatedModal from "../utils/animated-modal.js"; +import { showPopup } from "./simple-modals.js"; +import * as Notifications from "../elements/notifications.js"; +import { setMediaQueryDebugLevel } from "../ui.js"; let mediaQueryDebugLevel = 0; diff --git a/frontend/src/ts/modals/edit-preset.ts b/frontend/src/ts/modals/edit-preset.ts index c18fcc00f..637c5957c 100644 --- a/frontend/src/ts/modals/edit-preset.ts +++ b/frontend/src/ts/modals/edit-preset.ts @@ -1,11 +1,11 @@ -import Ape from "../ape"; -import * as DB from "../db"; -import * as Config from "../config"; -import * as Loader from "../elements/loader"; -import * as Settings from "../pages/settings"; -import * as Notifications from "../elements/notifications"; -import * as ConnectionState from "../states/connection"; -import AnimatedModal from "../utils/animated-modal"; +import Ape from "../ape.js"; +import * as DB from "../db.js"; +import * as Config from "../config.js"; +import * as Loader from "../elements/loader.js"; +import * as Settings from "../pages/settings.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ConnectionState from "../states/connection.js"; +import AnimatedModal from "../utils/animated-modal.js"; export function show(action: string, id?: string, name?: string): void { if (!ConnectionState.get()) { diff --git a/frontend/src/ts/modals/edit-profile.ts b/frontend/src/ts/modals/edit-profile.ts index b179968fb..eaa41b7e0 100644 --- a/frontend/src/ts/modals/edit-profile.ts +++ b/frontend/src/ts/modals/edit-profile.ts @@ -1,12 +1,12 @@ -import Ape from "../ape"; -import { getHTMLById } from "../controllers/badge-controller"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as ConnectionState from "../states/connection"; -import AnimatedModal from "../utils/animated-modal"; -import * as Profile from "../elements/profile"; -import { CharacterCounter } from "../elements/character-counter"; +import Ape from "../ape.js"; +import { getHTMLById } from "../controllers/badge-controller.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ConnectionState from "../states/connection.js"; +import AnimatedModal from "../utils/animated-modal.js"; +import * as Profile from "../elements/profile.js"; +import { CharacterCounter } from "../elements/character-counter.js"; export function show(): void { if (!ConnectionState.get()) { diff --git a/frontend/src/ts/modals/edit-result-tags.ts b/frontend/src/ts/modals/edit-result-tags.ts index 6c373e876..a7b309c88 100644 --- a/frontend/src/ts/modals/edit-result-tags.ts +++ b/frontend/src/ts/modals/edit-result-tags.ts @@ -1,12 +1,12 @@ -import Ape from "../ape"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as AccountPage from "../pages/account"; -import * as ConnectionState from "../states/connection"; -import { areUnsortedArraysEqual } from "../utils/arrays"; -import * as Result from "../test/result"; -import AnimatedModal from "../utils/animated-modal"; +import Ape from "../ape.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as AccountPage from "../pages/account.js"; +import * as ConnectionState from "../states/connection.js"; +import { areUnsortedArraysEqual } from "../utils/arrays.js"; +import * as Result from "../test/result.js"; +import AnimatedModal from "../utils/animated-modal.js"; type State = { resultId: string; diff --git a/frontend/src/ts/modals/edit-tag.ts b/frontend/src/ts/modals/edit-tag.ts index b5ec99e80..69d7fbb5c 100644 --- a/frontend/src/ts/modals/edit-tag.ts +++ b/frontend/src/ts/modals/edit-tag.ts @@ -1,10 +1,10 @@ -import Ape from "../ape"; -import * as DB from "../db"; -import * as Notifications from "../elements/notifications"; -import * as Loader from "../elements/loader"; -import * as Settings from "../pages/settings"; -import * as ConnectionState from "../states/connection"; -import AnimatedModal from "../utils/animated-modal"; +import Ape from "../ape.js"; +import * as DB from "../db.js"; +import * as Notifications from "../elements/notifications.js"; +import * as Loader from "../elements/loader.js"; +import * as Settings from "../pages/settings.js"; +import * as ConnectionState from "../states/connection.js"; +import AnimatedModal from "../utils/animated-modal.js"; export function show( action: string, diff --git a/frontend/src/ts/modals/google-sign-up.ts b/frontend/src/ts/modals/google-sign-up.ts index c2f5fafbe..f30c867f5 100644 --- a/frontend/src/ts/modals/google-sign-up.ts +++ b/frontend/src/ts/modals/google-sign-up.ts @@ -1,4 +1,4 @@ -import * as Notifications from "../elements/notifications"; +import * as Notifications from "../elements/notifications.js"; import { debounce } from "throttle-debounce"; import { sendEmailVerification, @@ -6,17 +6,17 @@ import { UserCredential, getAdditionalUserInfo, } from "firebase/auth"; -import Ape from "../ape"; -import { createErrorMessage } from "../utils/misc"; -import * as LoginPage from "../pages/login"; -import * as AccountController from "../controllers/account-controller"; -import * as TestLogic from "../test/test-logic"; -import * as CaptchaController from "../controllers/captcha-controller"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import { subscribe as subscribeToSignUpEvent } from "../observables/google-sign-up-event"; -import { InputIndicator } from "../elements/input-indicator"; -import AnimatedModal from "../utils/animated-modal"; +import Ape from "../ape.js"; +import { createErrorMessage } from "../utils/misc.js"; +import * as LoginPage from "../pages/login.js"; +import * as AccountController from "../controllers/account-controller.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as CaptchaController from "../controllers/captcha-controller.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import { subscribe as subscribeToSignUpEvent } from "../observables/google-sign-up-event.js"; +import { InputIndicator } from "../elements/input-indicator.js"; +import AnimatedModal from "../utils/animated-modal.js"; let signedInUser: UserCredential | undefined = undefined; diff --git a/frontend/src/ts/modals/import-export-settings.ts b/frontend/src/ts/modals/import-export-settings.ts index c76cf0e2f..36a79d11d 100644 --- a/frontend/src/ts/modals/import-export-settings.ts +++ b/frontend/src/ts/modals/import-export-settings.ts @@ -1,6 +1,6 @@ -import * as UpdateConfig from "../config"; -import * as Notifications from "../elements/notifications"; -import AnimatedModal from "../utils/animated-modal"; +import * as UpdateConfig from "../config.js"; +import * as Notifications from "../elements/notifications.js"; +import AnimatedModal from "../utils/animated-modal.js"; type State = { mode: "import" | "export"; diff --git a/frontend/src/ts/modals/mobile-test-config.ts b/frontend/src/ts/modals/mobile-test-config.ts index facf94253..dcb8531b7 100644 --- a/frontend/src/ts/modals/mobile-test-config.ts +++ b/frontend/src/ts/modals/mobile-test-config.ts @@ -1,11 +1,11 @@ -import * as TestLogic from "../test/test-logic"; -import Config, * as UpdateConfig from "../config"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as CustomWordAmountPopup from "./custom-word-amount"; -import * as CustomTestDurationPopup from "./custom-test-duration"; -import * as QuoteSearchModal from "./quote-search"; -import * as CustomTextPopup from "./custom-text"; -import AnimatedModal from "../utils/animated-modal"; +import * as TestLogic from "../test/test-logic.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as CustomWordAmountPopup from "./custom-word-amount.js"; +import * as CustomTestDurationPopup from "./custom-test-duration.js"; +import * as QuoteSearchModal from "./quote-search.js"; +import * as CustomTextPopup from "./custom-text.js"; +import AnimatedModal from "../utils/animated-modal.js"; function update(): void { const el = $("#mobileTestConfigModal"); diff --git a/frontend/src/ts/modals/new-filter-preset.ts b/frontend/src/ts/modals/new-filter-preset.ts index 31c3e51c9..c87ab1778 100644 --- a/frontend/src/ts/modals/new-filter-preset.ts +++ b/frontend/src/ts/modals/new-filter-preset.ts @@ -1,6 +1,6 @@ -import { createFilterPreset } from "../elements/account/result-filters"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import * as Notifications from "../elements/notifications"; +import { createFilterPreset } from "../elements/account/result-filters.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import * as Notifications from "../elements/notifications.js"; export function show(showOptions?: ShowOptions): void { void modal.show({ diff --git a/frontend/src/ts/modals/pb-tables.ts b/frontend/src/ts/modals/pb-tables.ts index 270ea57cf..275a89cd2 100644 --- a/frontend/src/ts/modals/pb-tables.ts +++ b/frontend/src/ts/modals/pb-tables.ts @@ -1,9 +1,9 @@ -import * as DB from "../db"; +import * as DB from "../db.js"; import { format } from "date-fns/format"; -import { getLanguageDisplayString } from "../utils/strings"; -import Config from "../config"; -import Format from "../utils/format"; -import AnimatedModal from "../utils/animated-modal"; +import { getLanguageDisplayString } from "../utils/strings.js"; +import Config from "../config.js"; +import Format from "../utils/format.js"; +import AnimatedModal from "../utils/animated-modal.js"; type PersonalBest = { mode2: SharedTypes.Config.Mode2<SharedTypes.Config.Mode>; diff --git a/frontend/src/ts/modals/quote-approve.ts b/frontend/src/ts/modals/quote-approve.ts index 243cbcdab..111a29e4b 100644 --- a/frontend/src/ts/modals/quote-approve.ts +++ b/frontend/src/ts/modals/quote-approve.ts @@ -1,8 +1,8 @@ -import Ape from "../ape"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; +import Ape from "../ape.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; import { format } from "date-fns/format"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; let quotes: Ape.Quotes.Quote[] = []; diff --git a/frontend/src/ts/modals/quote-rate.ts b/frontend/src/ts/modals/quote-rate.ts index 192609e17..297b3c4e6 100644 --- a/frontend/src/ts/modals/quote-rate.ts +++ b/frontend/src/ts/modals/quote-rate.ts @@ -1,8 +1,8 @@ -import Ape from "../ape"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import Ape from "../ape.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; let rating = 0; diff --git a/frontend/src/ts/modals/quote-report.ts b/frontend/src/ts/modals/quote-report.ts index 7bb72ae37..4e78567a3 100644 --- a/frontend/src/ts/modals/quote-report.ts +++ b/frontend/src/ts/modals/quote-report.ts @@ -1,13 +1,13 @@ -import Ape from "../ape"; -import Config from "../config"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import QuotesController from "../controllers/quotes-controller"; -import * as CaptchaController from "../controllers/captcha-controller"; -import { removeLanguageSize } from "../utils/strings"; +import Ape from "../ape.js"; +import Config from "../config.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import QuotesController from "../controllers/quotes-controller.js"; +import * as CaptchaController from "../controllers/captcha-controller.js"; +import { removeLanguageSize } from "../utils/strings.js"; import SlimSelect from "slim-select"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import { CharacterCounter } from "../elements/character-counter"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import { CharacterCounter } from "../elements/character-counter.js"; type State = { quoteToReport?: MonkeyTypes.Quote; diff --git a/frontend/src/ts/modals/quote-search.ts b/frontend/src/ts/modals/quote-search.ts index 4fdaf2e95..71202ff1b 100644 --- a/frontend/src/ts/modals/quote-search.ts +++ b/frontend/src/ts/modals/quote-search.ts @@ -1,26 +1,26 @@ -import Config, * as UpdateConfig from "../config"; -import * as DB from "../db"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as Notifications from "../elements/notifications"; -import * as QuoteSubmitPopup from "./quote-submit"; -import * as QuoteApprovePopup from "./quote-approve"; -import * as QuoteReportModal from "./quote-report"; +import Config, * as UpdateConfig from "../config.js"; +import * as DB from "../db.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as Notifications from "../elements/notifications.js"; +import * as QuoteSubmitPopup from "./quote-submit.js"; +import * as QuoteApprovePopup from "./quote-approve.js"; +import * as QuoteReportModal from "./quote-report.js"; import { buildSearchService, SearchService, TextExtractor, } from "../utils/search-service"; -import { splitByAndKeep } from "../utils/strings"; -import QuotesController from "../controllers/quotes-controller"; -import { isAuthenticated } from "../firebase"; +import { splitByAndKeep } from "../utils/strings.js"; +import QuotesController from "../controllers/quotes-controller.js"; +import { isAuthenticated } from "../firebase.js"; import { debounce } from "throttle-debounce"; -import Ape from "../ape"; -import * as Loader from "../elements/loader"; +import Ape from "../ape.js"; +import * as Loader from "../elements/loader.js"; import SlimSelect from "slim-select"; -import * as TestState from "../test/test-state"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import * as TestLogic from "../test/test-logic"; -import { createErrorMessage } from "../utils/misc"; +import * as TestState from "../test/test-state.js"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import * as TestLogic from "../test/test-logic.js"; +import { createErrorMessage } from "../utils/misc.js"; const searchServiceCache: Record<string, SearchService<MonkeyTypes.Quote>> = {}; diff --git a/frontend/src/ts/modals/quote-submit.ts b/frontend/src/ts/modals/quote-submit.ts index 370c4eb28..d96f179eb 100644 --- a/frontend/src/ts/modals/quote-submit.ts +++ b/frontend/src/ts/modals/quote-submit.ts @@ -1,13 +1,13 @@ -import Ape from "../ape"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as CaptchaController from "../controllers/captcha-controller"; -import * as Strings from "../utils/strings"; -import * as JSONData from "../utils/json-data"; -import Config from "../config"; +import Ape from "../ape.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as CaptchaController from "../controllers/captcha-controller.js"; +import * as Strings from "../utils/strings.js"; +import * as JSONData from "../utils/json-data.js"; +import Config from "../config.js"; import SlimSelect from "slim-select"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; -import { CharacterCounter } from "../elements/character-counter"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; +import { CharacterCounter } from "../elements/character-counter.js"; let dropdownReady = false; async function initDropdown(): Promise<void> { diff --git a/frontend/src/ts/modals/register-captcha.ts b/frontend/src/ts/modals/register-captcha.ts index 7be9e58ba..2f4afca2d 100644 --- a/frontend/src/ts/modals/register-captcha.ts +++ b/frontend/src/ts/modals/register-captcha.ts @@ -1,5 +1,5 @@ -import * as CaptchaController from "../controllers/captcha-controller"; -import AnimatedModal from "../utils/animated-modal"; +import * as CaptchaController from "../controllers/captcha-controller.js"; +import AnimatedModal from "../utils/animated-modal.js"; let resolvePromise: (token?: string) => void; diff --git a/frontend/src/ts/modals/save-custom-text.ts b/frontend/src/ts/modals/save-custom-text.ts index 728327537..a97904ca9 100644 --- a/frontend/src/ts/modals/save-custom-text.ts +++ b/frontend/src/ts/modals/save-custom-text.ts @@ -1,9 +1,9 @@ -import * as CustomText from "../test/custom-text"; -import * as Notifications from "../elements/notifications"; -import * as CustomTextState from "../states/custom-text-name"; -import { InputIndicator } from "../elements/input-indicator"; +import * as CustomText from "../test/custom-text.js"; +import * as Notifications from "../elements/notifications.js"; +import * as CustomTextState from "../states/custom-text-name.js"; +import { InputIndicator } from "../elements/input-indicator.js"; import { debounce } from "throttle-debounce"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; let indicator: InputIndicator | undefined; diff --git a/frontend/src/ts/modals/saved-texts.ts b/frontend/src/ts/modals/saved-texts.ts index aa7ae8b4e..9537f296c 100644 --- a/frontend/src/ts/modals/saved-texts.ts +++ b/frontend/src/ts/modals/saved-texts.ts @@ -1,11 +1,11 @@ -import * as CustomText from "../test/custom-text"; -import * as CustomTextState from "../states/custom-text-name"; -import { escapeHTML } from "../utils/misc"; +import * as CustomText from "../test/custom-text.js"; +import * as CustomTextState from "../states/custom-text-name.js"; +import { escapeHTML } from "../utils/misc.js"; import AnimatedModal, { HideOptions, ShowOptions, } from "../utils/animated-modal"; -import { showPopup } from "./simple-modals"; +import { showPopup } from "./simple-modals.js"; async function fill(): Promise<void> { const names = CustomText.getCustomTextNames(); diff --git a/frontend/src/ts/modals/share-custom-theme.ts b/frontend/src/ts/modals/share-custom-theme.ts index 13d95d7f7..bfafa2a7b 100644 --- a/frontend/src/ts/modals/share-custom-theme.ts +++ b/frontend/src/ts/modals/share-custom-theme.ts @@ -1,7 +1,7 @@ -import * as ThemeController from "../controllers/theme-controller"; -import Config from "../config"; -import * as Notifications from "../elements/notifications"; -import AnimatedModal from "../utils/animated-modal"; +import * as ThemeController from "../controllers/theme-controller.js"; +import Config from "../config.js"; +import * as Notifications from "../elements/notifications.js"; +import AnimatedModal from "../utils/animated-modal.js"; type State = { includeBackground: boolean; diff --git a/frontend/src/ts/modals/share-test-settings.ts b/frontend/src/ts/modals/share-test-settings.ts index ccc61a902..113be21f5 100644 --- a/frontend/src/ts/modals/share-test-settings.ts +++ b/frontend/src/ts/modals/share-test-settings.ts @@ -1,9 +1,9 @@ -import Config from "../config"; -import { currentQuote } from "../test/test-words"; -import { getMode2 } from "../utils/misc"; -import * as CustomText from "../test/custom-text"; +import Config from "../config.js"; +import { currentQuote } from "../test/test-words.js"; +import { getMode2 } from "../utils/misc.js"; +import * as CustomText from "../test/custom-text.js"; import { compressToURI } from "lz-ts"; -import AnimatedModal, { ShowOptions } from "../utils/animated-modal"; +import AnimatedModal, { ShowOptions } from "../utils/animated-modal.js"; function getCheckboxValue(checkbox: string): boolean { return $(`#shareTestSettingsModal label.${checkbox} input`).prop("checked"); diff --git a/frontend/src/ts/modals/simple-modals.ts b/frontend/src/ts/modals/simple-modals.ts index 7f9bbf9af..5870d0671 100644 --- a/frontend/src/ts/modals/simple-modals.ts +++ b/frontend/src/ts/modals/simple-modals.ts @@ -1,16 +1,16 @@ -import Ape from "../ape"; -import * as AccountController from "../controllers/account-controller"; -import * as DB from "../db"; -import * as UpdateConfig from "../config"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as Settings from "../pages/settings"; -import * as ThemePicker from "../elements/settings/theme-picker"; -import * as CustomText from "../test/custom-text"; -import * as AccountButton from "../elements/account-button"; +import Ape from "../ape.js"; +import * as AccountController from "../controllers/account-controller.js"; +import * as DB from "../db.js"; +import * as UpdateConfig from "../config.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as Settings from "../pages/settings.js"; +import * as ThemePicker from "../elements/settings/theme-picker.js"; +import * as CustomText from "../test/custom-text.js"; +import * as AccountButton from "../elements/account-button.js"; import { FirebaseError } from "firebase/app"; -import { Auth, isAuthenticated, getAuthenticatedUser } from "../firebase"; -import * as ConnectionState from "../states/connection"; +import { Auth, isAuthenticated, getAuthenticatedUser } from "../firebase.js"; +import * as ConnectionState from "../states/connection.js"; import { EmailAuthProvider, User, @@ -25,14 +25,14 @@ import { isPasswordStrong, reloadAfter, } from "../utils/misc"; -import * as CustomTextState from "../states/custom-text-name"; -import * as ThemeController from "../controllers/theme-controller"; +import * as CustomTextState from "../states/custom-text-name.js"; +import * as ThemeController from "../controllers/theme-controller.js"; import AnimatedModal, { HideOptions, ShowOptions, } from "../utils/animated-modal"; import { format as dateFormat } from "date-fns/format"; -import { Attributes, buildTag } from "../utils/tag-builder"; +import { Attributes, buildTag } from "../utils/tag-builder.js"; type CommonInput<TType, TValue> = { type: TType; diff --git a/frontend/src/ts/modals/streak-hour-offset.ts b/frontend/src/ts/modals/streak-hour-offset.ts index bd01854f0..d6e210dd5 100644 --- a/frontend/src/ts/modals/streak-hour-offset.ts +++ b/frontend/src/ts/modals/streak-hour-offset.ts @@ -1,11 +1,11 @@ -import Ape from "../ape"; -// import * as DB from "../db"; -import * as Notifications from "../elements/notifications"; -import * as Loader from "../elements/loader"; -// import * as Settings from "../pages/settings"; -import * as ConnectionState from "../states/connection"; -import { getSnapshot, setSnapshot } from "../db"; -import AnimatedModal from "../utils/animated-modal"; +import Ape from "../ape.js"; +// import * as DB from "../db.js"; +import * as Notifications from "../elements/notifications.js"; +import * as Loader from "../elements/loader.js"; +// import * as Settings from "../pages/settings.js"; +import * as ConnectionState from "../states/connection.js"; +import { getSnapshot, setSnapshot } from "../db.js"; +import AnimatedModal from "../utils/animated-modal.js"; export function show(): void { if (!ConnectionState.get()) { diff --git a/frontend/src/ts/modals/support.ts b/frontend/src/ts/modals/support.ts index f1ad83315..4aec04210 100644 --- a/frontend/src/ts/modals/support.ts +++ b/frontend/src/ts/modals/support.ts @@ -1,5 +1,5 @@ -import AnimatedModal from "../utils/animated-modal"; -import { getCommandline } from "../utils/async-modules"; +import AnimatedModal from "../utils/animated-modal.js"; +import { getCommandline } from "../utils/async-modules.js"; export function show(): void { void modal.show(); diff --git a/frontend/src/ts/modals/user-report.ts b/frontend/src/ts/modals/user-report.ts index 400fc6f54..1e37883d6 100644 --- a/frontend/src/ts/modals/user-report.ts +++ b/frontend/src/ts/modals/user-report.ts @@ -1,11 +1,11 @@ -import Ape from "../ape"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as CaptchaController from "../controllers/captcha-controller"; +import Ape from "../ape.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as CaptchaController from "../controllers/captcha-controller.js"; import SlimSelect from "slim-select"; -import AnimatedModal from "../utils/animated-modal"; -import { isAuthenticated } from "../firebase"; -import { CharacterCounter } from "../elements/character-counter"; +import AnimatedModal from "../utils/animated-modal.js"; +import { isAuthenticated } from "../firebase.js"; +import { CharacterCounter } from "../elements/character-counter.js"; type State = { userUid?: string; diff --git a/frontend/src/ts/modals/version-history.ts b/frontend/src/ts/modals/version-history.ts index d5c89c7cb..f152df1c5 100644 --- a/frontend/src/ts/modals/version-history.ts +++ b/frontend/src/ts/modals/version-history.ts @@ -1,6 +1,6 @@ import { format } from "date-fns/format"; -import { getReleasesFromGitHub } from "../utils/json-data"; -import AnimatedModal from "../utils/animated-modal"; +import { getReleasesFromGitHub } from "../utils/json-data.js"; +import AnimatedModal from "../utils/animated-modal.js"; export function show(): void { void modal.show({ diff --git a/frontend/src/ts/modals/word-filter.ts b/frontend/src/ts/modals/word-filter.ts index 1ff21624e..419dd3e6b 100644 --- a/frontend/src/ts/modals/word-filter.ts +++ b/frontend/src/ts/modals/word-filter.ts @@ -1,7 +1,7 @@ -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import * as CustomText from "../test/custom-text"; -import * as Notifications from "../elements/notifications"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import * as CustomText from "../test/custom-text.js"; +import * as Notifications from "../elements/notifications.js"; import SlimSelect from "slim-select"; import AnimatedModal, { HideOptions, diff --git a/frontend/src/ts/pages/404.ts b/frontend/src/ts/pages/404.ts index 683ab7b3e..d277436f3 100644 --- a/frontend/src/ts/pages/404.ts +++ b/frontend/src/ts/pages/404.ts @@ -1,5 +1,5 @@ -import Page from "./page"; -import * as Skeleton from "../utils/skeleton"; +import Page from "./page.js"; +import * as Skeleton from "../utils/skeleton.js"; export const page = new Page({ name: "404", diff --git a/frontend/src/ts/pages/about.ts b/frontend/src/ts/pages/about.ts index f376723b2..a6652f14d 100644 --- a/frontend/src/ts/pages/about.ts +++ b/frontend/src/ts/pages/about.ts @@ -1,13 +1,13 @@ -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import * as Numbers from "../utils/numbers"; -import Page from "./page"; -import Ape from "../ape"; -import * as Notifications from "../elements/notifications"; -import * as ChartController from "../controllers/chart-controller"; -import * as ConnectionState from "../states/connection"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Numbers from "../utils/numbers.js"; +import Page from "./page.js"; +import Ape from "../ape.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ChartController from "../controllers/chart-controller.js"; +import * as ConnectionState from "../states/connection.js"; import { intervalToDuration } from "date-fns/intervalToDuration"; -import * as Skeleton from "../utils/skeleton"; +import * as Skeleton from "../utils/skeleton.js"; function reset(): void { $(".pageAbout .contributors").empty(); diff --git a/frontend/src/ts/pages/account.ts b/frontend/src/ts/pages/account.ts index 03a75b759..8a2112ce1 100644 --- a/frontend/src/ts/pages/account.ts +++ b/frontend/src/ts/pages/account.ts @@ -1,32 +1,32 @@ -import * as DB from "../db"; -import * as ResultFilters from "../elements/account/result-filters"; -import * as ThemeColors from "../elements/theme-colors"; -import * as ChartController from "../controllers/chart-controller"; -import Config, * as UpdateConfig from "../config"; -import * as MiniResultChart from "../elements/account/mini-result-chart"; -import * as PbTables from "../elements/account/pb-tables"; -import * as LoadingPage from "./loading"; -import * as Focus from "../test/focus"; -import * as TodayTracker from "../test/today-tracker"; -import * as Notifications from "../elements/notifications"; -import Page from "./page"; -import * as DateTime from "../utils/date-and-time"; -import * as Misc from "../utils/misc"; -import * as Arrays from "../utils/arrays"; -import * as Numbers from "../utils/numbers"; -import { get as getTypingSpeedUnit } from "../utils/typing-speed-units"; -import * as Profile from "../elements/profile"; +import * as DB from "../db.js"; +import * as ResultFilters from "../elements/account/result-filters.js"; +import * as ThemeColors from "../elements/theme-colors.js"; +import * as ChartController from "../controllers/chart-controller.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as MiniResultChart from "../elements/account/mini-result-chart.js"; +import * as PbTables from "../elements/account/pb-tables.js"; +import * as LoadingPage from "./loading.js"; +import * as Focus from "../test/focus.js"; +import * as TodayTracker from "../test/today-tracker.js"; +import * as Notifications from "../elements/notifications.js"; +import Page from "./page.js"; +import * as DateTime from "../utils/date-and-time.js"; +import * as Misc from "../utils/misc.js"; +import * as Arrays from "../utils/arrays.js"; +import * as Numbers from "../utils/numbers.js"; +import { get as getTypingSpeedUnit } from "../utils/typing-speed-units.js"; +import * as Profile from "../elements/profile.js"; import { format } from "date-fns/format"; -import * as ConnectionState from "../states/connection"; -import * as Skeleton from "../utils/skeleton"; +import * as ConnectionState from "../states/connection.js"; +import * as Skeleton from "../utils/skeleton.js"; import type { ScaleChartOptions, LinearScaleOptions } from "chart.js"; -import * as ConfigEvent from "../observables/config-event"; -import * as ActivePage from "../states/active-page"; -import { Auth } from "../firebase"; -import * as Loader from "../elements/loader"; -import * as ResultBatches from "../elements/result-batches"; -import Format from "../utils/format"; -import * as TestActivity from "../elements/test-activity"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as ActivePage from "../states/active-page.js"; +import { Auth } from "../firebase.js"; +import * as Loader from "../elements/loader.js"; +import * as ResultBatches from "../elements/result-batches.js"; +import Format from "../utils/format.js"; +import * as TestActivity from "../elements/test-activity.js"; let filterDebug = false; //toggle filterdebug diff --git a/frontend/src/ts/pages/loading.ts b/frontend/src/ts/pages/loading.ts index 538866b31..5093969f9 100644 --- a/frontend/src/ts/pages/loading.ts +++ b/frontend/src/ts/pages/loading.ts @@ -1,6 +1,6 @@ -import * as Misc from "../utils/misc"; -import Page from "./page"; -import * as Skeleton from "../utils/skeleton"; +import * as Misc from "../utils/misc.js"; +import Page from "./page.js"; +import * as Skeleton from "../utils/skeleton.js"; export function updateBar(percentage: number, fast = false): void { const speed = fast ? 100 : 1000; diff --git a/frontend/src/ts/pages/login.ts b/frontend/src/ts/pages/login.ts index 0bbc3336b..e1f8e210e 100644 --- a/frontend/src/ts/pages/login.ts +++ b/frontend/src/ts/pages/login.ts @@ -1,11 +1,11 @@ import { debounce } from "throttle-debounce"; -import Ape from "../ape"; -import Page from "./page"; -import * as Notifications from "../elements/notifications"; -import { InputIndicator } from "../elements/input-indicator"; -import * as Skeleton from "../utils/skeleton"; -import * as Misc from "../utils/misc"; -import TypoList from "../utils/typo-list"; +import Ape from "../ape.js"; +import Page from "./page.js"; +import * as Notifications from "../elements/notifications.js"; +import { InputIndicator } from "../elements/input-indicator.js"; +import * as Skeleton from "../utils/skeleton.js"; +import * as Misc from "../utils/misc.js"; +import TypoList from "../utils/typo-list.js"; export function enableSignUpButton(): void { $(".page.pageLogin .register.side button").prop("disabled", false); diff --git a/frontend/src/ts/pages/profile-search.ts b/frontend/src/ts/pages/profile-search.ts index 64c98a9fa..4922628a5 100644 --- a/frontend/src/ts/pages/profile-search.ts +++ b/frontend/src/ts/pages/profile-search.ts @@ -1,5 +1,5 @@ -import Page from "./page"; -import * as Skeleton from "../utils/skeleton"; +import Page from "./page.js"; +import * as Skeleton from "../utils/skeleton.js"; export const page = new Page({ name: "profileSearch", diff --git a/frontend/src/ts/pages/profile.ts b/frontend/src/ts/pages/profile.ts index 56698a486..2ed41907d 100644 --- a/frontend/src/ts/pages/profile.ts +++ b/frontend/src/ts/pages/profile.ts @@ -1,11 +1,11 @@ -import Ape from "../ape"; -import Page from "./page"; -import * as Profile from "../elements/profile"; -import * as PbTables from "../elements/account/pb-tables"; -import * as Notifications from "../elements/notifications"; -import { checkIfGetParameterExists } from "../utils/misc"; -import * as UserReportModal from "../modals/user-report"; -import * as Skeleton from "../utils/skeleton"; +import Ape from "../ape.js"; +import Page from "./page.js"; +import * as Profile from "../elements/profile.js"; +import * as PbTables from "../elements/account/pb-tables.js"; +import * as Notifications from "../elements/notifications.js"; +import { checkIfGetParameterExists } from "../utils/misc.js"; +import * as UserReportModal from "../modals/user-report.js"; +import * as Skeleton from "../utils/skeleton.js"; function reset(): void { $(".page.pageProfile .preloader").removeClass("hidden"); diff --git a/frontend/src/ts/pages/settings.ts b/frontend/src/ts/pages/settings.ts index bf4d47fee..f083d366c 100644 --- a/frontend/src/ts/pages/settings.ts +++ b/frontend/src/ts/pages/settings.ts @@ -1,27 +1,27 @@ -import SettingsGroup from "../elements/settings/settings-group"; -import Config, * as UpdateConfig from "../config"; -import * as Sound from "../controllers/sound-controller"; -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as JSONData from "../utils/json-data"; -import * as DB from "../db"; -import { toggleFunbox } from "../test/funbox/funbox"; -import * as TagController from "../controllers/tag-controller"; -import * as PresetController from "../controllers/preset-controller"; -import * as ThemePicker from "../elements/settings/theme-picker"; -import * as Notifications from "../elements/notifications"; -import * as ImportExportSettingsModal from "../modals/import-export-settings"; -import * as ConfigEvent from "../observables/config-event"; -import * as ActivePage from "../states/active-page"; -import Page from "./page"; -import { getAuthenticatedUser, isAuthenticated } from "../firebase"; -import Ape from "../ape"; -import { areFunboxesCompatible } from "../test/funbox/funbox-validation"; -import { get as getTypingSpeedUnit } from "../utils/typing-speed-units"; +import SettingsGroup from "../elements/settings/settings-group.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as Sound from "../controllers/sound-controller.js"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as JSONData from "../utils/json-data.js"; +import * as DB from "../db.js"; +import { toggleFunbox } from "../test/funbox/funbox.js"; +import * as TagController from "../controllers/tag-controller.js"; +import * as PresetController from "../controllers/preset-controller.js"; +import * as ThemePicker from "../elements/settings/theme-picker.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ImportExportSettingsModal from "../modals/import-export-settings.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as ActivePage from "../states/active-page.js"; +import Page from "./page.js"; +import { getAuthenticatedUser, isAuthenticated } from "../firebase.js"; +import Ape from "../ape.js"; +import { areFunboxesCompatible } from "../test/funbox/funbox-validation.js"; +import { get as getTypingSpeedUnit } from "../utils/typing-speed-units.js"; import SlimSelect from "slim-select"; -import * as Skeleton from "../utils/skeleton"; -import * as CustomBackgroundFilter from "../elements/custom-background-filter"; +import * as Skeleton from "../utils/skeleton.js"; +import * as CustomBackgroundFilter from "../elements/custom-background-filter.js"; type SettingsGroups<T extends SharedTypes.ConfigValue> = Record< string, diff --git a/frontend/src/ts/pages/test.ts b/frontend/src/ts/pages/test.ts index 717f6f0d5..1e80a0ef6 100644 --- a/frontend/src/ts/pages/test.ts +++ b/frontend/src/ts/pages/test.ts @@ -1,12 +1,12 @@ -import * as TestStats from "../test/test-stats"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as TestLogic from "../test/test-logic"; -import * as Funbox from "../test/funbox/funbox"; -import Page from "./page"; -import { updateFooterAndVerticalAds } from "../controllers/ad-controller"; -import * as ModesNotice from "../elements/modes-notice"; -import * as Keymap from "../elements/keymap"; -import * as TestConfig from "../test/test-config"; +import * as TestStats from "../test/test-stats.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as TestLogic from "../test/test-logic.js"; +import * as Funbox from "../test/funbox/funbox.js"; +import Page from "./page.js"; +import { updateFooterAndVerticalAds } from "../controllers/ad-controller.js"; +import * as ModesNotice from "../elements/modes-notice.js"; +import * as Keymap from "../elements/keymap.js"; +import * as TestConfig from "../test/test-config.js"; export const page = new Page({ name: "test", diff --git a/frontend/src/ts/popups/video-ad-popup.ts b/frontend/src/ts/popups/video-ad-popup.ts index dbf39e64d..bc17a9fc6 100644 --- a/frontend/src/ts/popups/video-ad-popup.ts +++ b/frontend/src/ts/popups/video-ad-popup.ts @@ -1,7 +1,7 @@ -import * as Notifications from "../elements/notifications"; -import * as AdController from "../controllers/ad-controller"; -import * as Skeleton from "../utils/skeleton"; -import { isPopupVisible } from "../utils/misc"; +import * as Notifications from "../elements/notifications.js"; +import * as AdController from "../controllers/ad-controller.js"; +import * as Skeleton from "../utils/skeleton.js"; +import { isPopupVisible } from "../utils/misc.js"; const wrapperId = "videoAdPopupWrapper"; diff --git a/frontend/src/ts/ready.ts b/frontend/src/ts/ready.ts index e373d44dc..eaccb90fd 100644 --- a/frontend/src/ts/ready.ts +++ b/frontend/src/ts/ready.ts @@ -1,14 +1,14 @@ -import Config from "./config"; -import * as Misc from "./utils/misc"; -import * as MonkeyPower from "./elements/monkey-power"; -import * as Notifications from "./elements/notifications"; -import * as CookiesModal from "./modals/cookies"; -import * as PSA from "./elements/psa"; -import * as ConnectionState from "./states/connection"; -import * as FunboxList from "./test/funbox/funbox-list"; +import Config from "./config.js"; +import * as Misc from "./utils/misc.js"; +import * as MonkeyPower from "./elements/monkey-power.js"; +import * as Notifications from "./elements/notifications.js"; +import * as CookiesModal from "./modals/cookies.js"; +import * as PSA from "./elements/psa.js"; +import * as ConnectionState from "./states/connection.js"; +import * as FunboxList from "./test/funbox/funbox-list.js"; //@ts-expect-error import Konami from "konami"; -import * as ServerConfiguration from "./ape/server-configuration"; +import * as ServerConfiguration from "./ape/server-configuration.js"; $((): void => { Misc.loadCSS("/css/slimselect.min.css", true); diff --git a/frontend/src/ts/states/connection.ts b/frontend/src/ts/states/connection.ts index 5b1d0b966..3e854d3d9 100644 --- a/frontend/src/ts/states/connection.ts +++ b/frontend/src/ts/states/connection.ts @@ -1,7 +1,7 @@ import { throttle } from "throttle-debounce"; -import * as Notifications from "../elements/notifications"; -import * as ConnectionEvent from "../observables/connection-event"; -import * as TestState from "../test/test-state"; +import * as Notifications from "../elements/notifications.js"; +import * as ConnectionEvent from "../observables/connection-event.js"; +import * as TestState from "../test/test-state.js"; let state = navigator.onLine; diff --git a/frontend/src/ts/states/version.ts b/frontend/src/ts/states/version.ts index 76aedc4a1..154e03ae9 100644 --- a/frontend/src/ts/states/version.ts +++ b/frontend/src/ts/states/version.ts @@ -1,4 +1,4 @@ -import { getLatestReleaseFromGitHub } from "../utils/json-data"; +import { getLatestReleaseFromGitHub } from "../utils/json-data.js"; const LOCALSTORAGE_KEY = "lastSeenVersion"; diff --git a/frontend/src/ts/test/british-english.ts b/frontend/src/ts/test/british-english.ts index 365dc5096..4323028ad 100644 --- a/frontend/src/ts/test/british-english.ts +++ b/frontend/src/ts/test/british-english.ts @@ -1,6 +1,6 @@ -import Config from "../config"; -import { capitalizeFirstLetterOfEachWord } from "../utils/strings"; -import { cachedFetchJson } from "../utils/json-data"; +import Config from "../config.js"; +import { capitalizeFirstLetterOfEachWord } from "../utils/strings.js"; +import { cachedFetchJson } from "../utils/json-data.js"; type BritishEnglishReplacement = { 0: string; diff --git a/frontend/src/ts/test/caps-warning.ts b/frontend/src/ts/test/caps-warning.ts index 183dd7e6b..354f8d0b3 100644 --- a/frontend/src/ts/test/caps-warning.ts +++ b/frontend/src/ts/test/caps-warning.ts @@ -1,4 +1,4 @@ -import Config from "../config"; +import Config from "../config.js"; const el = document.querySelector("#capsWarning") as HTMLElement; const isMacOs = navigator.platform.startsWith("Mac"); diff --git a/frontend/src/ts/test/caret.ts b/frontend/src/ts/test/caret.ts index 8a5126b42..0822a6577 100644 --- a/frontend/src/ts/test/caret.ts +++ b/frontend/src/ts/test/caret.ts @@ -1,10 +1,10 @@ -import * as Numbers from "../utils/numbers"; -import * as JSONData from "../utils/json-data"; -import Config from "../config"; -import * as TestInput from "./test-input"; -import * as SlowTimer from "../states/slow-timer"; -import * as TestState from "../test/test-state"; -import * as TestWords from "./test-words"; +import * as Numbers from "../utils/numbers.js"; +import * as JSONData from "../utils/json-data.js"; +import Config from "../config.js"; +import * as TestInput from "./test-input.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as TestState from "../test/test-state.js"; +import * as TestWords from "./test-words.js"; export let caretAnimating = true; const caret = document.querySelector("#caret") as HTMLElement; diff --git a/frontend/src/ts/test/english-punctuation.ts b/frontend/src/ts/test/english-punctuation.ts index 8cdf09741..ce0295f12 100644 --- a/frontend/src/ts/test/english-punctuation.ts +++ b/frontend/src/ts/test/english-punctuation.ts @@ -1,5 +1,5 @@ -import { randomElementFromArray } from "../utils/arrays"; -import { capitalizeFirstLetterOfEachWord } from "../utils/strings"; +import { randomElementFromArray } from "../utils/arrays.js"; +import { capitalizeFirstLetterOfEachWord } from "../utils/strings.js"; type Pair = [string, string[]]; diff --git a/frontend/src/ts/test/focus.ts b/frontend/src/ts/test/focus.ts index 539b7db5a..1b8860a39 100644 --- a/frontend/src/ts/test/focus.ts +++ b/frontend/src/ts/test/focus.ts @@ -1,9 +1,9 @@ -import * as Caret from "./caret"; -import * as ActivePage from "../states/active-page"; -import * as LiveSpeed from "./live-speed"; -import * as LiveBurst from "./live-burst"; -import * as LiveAcc from "./live-acc"; -import * as TimerProgress from "./timer-progress"; +import * as Caret from "./caret.js"; +import * as ActivePage from "../states/active-page.js"; +import * as LiveSpeed from "./live-speed.js"; +import * as LiveBurst from "./live-burst.js"; +import * as LiveAcc from "./live-acc.js"; +import * as TimerProgress from "./timer-progress.js"; const unfocusPx = 3; let state = false; diff --git a/frontend/src/ts/test/funbox/funbox-validation.ts b/frontend/src/ts/test/funbox/funbox-validation.ts index 7a4deb008..ddb820aaa 100644 --- a/frontend/src/ts/test/funbox/funbox-validation.ts +++ b/frontend/src/ts/test/funbox/funbox-validation.ts @@ -1,7 +1,7 @@ -import * as FunboxList from "./funbox-list"; -import * as Notifications from "../../elements/notifications"; -import * as Arrays from "../../utils/arrays"; -import * as Strings from "../../utils/strings"; +import * as FunboxList from "./funbox-list.js"; +import * as Notifications from "../../elements/notifications.js"; +import * as Arrays from "../../utils/arrays.js"; +import * as Strings from "../../utils/strings.js"; export function checkFunboxForcedConfigs( key: string, diff --git a/frontend/src/ts/test/funbox/funbox.ts b/frontend/src/ts/test/funbox/funbox.ts index a0916db3f..3e4a06a12 100644 --- a/frontend/src/ts/test/funbox/funbox.ts +++ b/frontend/src/ts/test/funbox/funbox.ts @@ -1,31 +1,31 @@ -import * as Notifications from "../../elements/notifications"; -import * as Misc from "../../utils/misc"; -import * as JSONData from "../../utils/json-data"; -import * as GetText from "../../utils/generate"; -import * as Numbers from "../../utils/numbers"; -import * as Arrays from "../../utils/arrays"; -import * as Strings from "../../utils/strings"; -import * as ManualRestart from "../manual-restart-tracker"; -import Config, * as UpdateConfig from "../../config"; -import * as MemoryTimer from "./memory-funbox-timer"; -import * as FunboxMemory from "./funbox-memory"; -import * as FunboxList from "./funbox-list"; -import { save } from "./funbox-memory"; -import * as TTSEvent from "../../observables/tts-event"; -import * as KeymapEvent from "../../observables/keymap-event"; -import * as TestWords from "../test-words"; -import * as TestInput from "../test-input"; -import * as WeakSpot from "../weak-spot"; -import { getPoem } from "../poetry"; -import { getSection } from "../wikipedia"; -import * as IPGenerator from "../ip-addresses"; +import * as Notifications from "../../elements/notifications.js"; +import * as Misc from "../../utils/misc.js"; +import * as JSONData from "../../utils/json-data.js"; +import * as GetText from "../../utils/generate.js"; +import * as Numbers from "../../utils/numbers.js"; +import * as Arrays from "../../utils/arrays.js"; +import * as Strings from "../../utils/strings.js"; +import * as ManualRestart from "../manual-restart-tracker.js"; +import Config, * as UpdateConfig from "../../config.js"; +import * as MemoryTimer from "./memory-funbox-timer.js"; +import * as FunboxMemory from "./funbox-memory.js"; +import * as FunboxList from "./funbox-list.js"; +import { save } from "./funbox-memory.js"; +import * as TTSEvent from "../../observables/tts-event.js"; +import * as KeymapEvent from "../../observables/keymap-event.js"; +import * as TestWords from "../test-words.js"; +import * as TestInput from "../test-input.js"; +import * as WeakSpot from "../weak-spot.js"; +import { getPoem } from "../poetry.js"; +import { getSection } from "../wikipedia.js"; +import * as IPGenerator from "../ip-addresses.js"; import { areFunboxesCompatible, checkFunboxForcedConfigs, } from "./funbox-validation"; -import { Wordset } from "../wordset"; -import * as LayoutfluidFunboxTimer from "./layoutfluid-funbox-timer"; -import * as DDR from "../../utils/ddr"; +import { Wordset } from "../wordset.js"; +import * as LayoutfluidFunboxTimer from "./layoutfluid-funbox-timer.js"; +import * as DDR from "../../utils/ddr.js"; const prefixSize = 2; diff --git a/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts b/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts index 95df4a5cf..0a016874f 100644 --- a/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts +++ b/frontend/src/ts/test/funbox/layoutfluid-funbox-timer.ts @@ -1,4 +1,4 @@ -import { capitalizeFirstLetter } from "../../utils/strings"; +import { capitalizeFirstLetter } from "../../utils/strings.js"; export function show(): void { $("#typingTest #layoutfluidTimer").stop(true, true).animate( diff --git a/frontend/src/ts/test/funbox/memory-funbox-timer.ts b/frontend/src/ts/test/funbox/memory-funbox-timer.ts index df851e747..4a70a0f41 100644 --- a/frontend/src/ts/test/funbox/memory-funbox-timer.ts +++ b/frontend/src/ts/test/funbox/memory-funbox-timer.ts @@ -1,4 +1,4 @@ -import * as TestWords from "../test-words"; +import * as TestWords from "../test-words.js"; let memoryTimer: number | null = null; let memoryInterval: NodeJS.Timeout | null = null; diff --git a/frontend/src/ts/test/ip-addresses.ts b/frontend/src/ts/test/ip-addresses.ts index 166613a9c..5f0871a54 100644 --- a/frontend/src/ts/test/ip-addresses.ts +++ b/frontend/src/ts/test/ip-addresses.ts @@ -1,4 +1,4 @@ -import { randomIntFromRange } from "../utils/numbers"; +import { randomIntFromRange } from "../utils/numbers.js"; function getRandomIPvXaddress( bits: number, diff --git a/frontend/src/ts/test/layout-emulator.ts b/frontend/src/ts/test/layout-emulator.ts index 37210d6f5..3113ef1d7 100644 --- a/frontend/src/ts/test/layout-emulator.ts +++ b/frontend/src/ts/test/layout-emulator.ts @@ -1,8 +1,8 @@ -import Config from "../config"; -import * as Misc from "../utils/misc"; -import * as JSONData from "../utils/json-data"; -import { capsState } from "./caps-warning"; -import * as Notifications from "../elements/notifications"; +import Config from "../config.js"; +import * as Misc from "../utils/misc.js"; +import * as JSONData from "../utils/json-data.js"; +import { capsState } from "./caps-warning.js"; +import * as Notifications from "../elements/notifications.js"; let isAltGrPressed = false; const isPunctuationPattern = /\p{P}/u; diff --git a/frontend/src/ts/test/live-acc.ts b/frontend/src/ts/test/live-acc.ts index afdb79189..28b8b33a5 100644 --- a/frontend/src/ts/test/live-acc.ts +++ b/frontend/src/ts/test/live-acc.ts @@ -1,6 +1,6 @@ -import Config from "../config"; -import * as TestState from "../test/test-state"; -import * as ConfigEvent from "../observables/config-event"; +import Config from "../config.js"; +import * as TestState from "../test/test-state.js"; +import * as ConfigEvent from "../observables/config-event.js"; const textEl = document.querySelector( "#liveStatsTextBottom .liveAcc" diff --git a/frontend/src/ts/test/live-burst.ts b/frontend/src/ts/test/live-burst.ts index e52769661..88d8a8ebf 100644 --- a/frontend/src/ts/test/live-burst.ts +++ b/frontend/src/ts/test/live-burst.ts @@ -1,7 +1,7 @@ -import Config from "../config"; -import * as TestState from "../test/test-state"; -import * as ConfigEvent from "../observables/config-event"; -import Format from "../utils/format"; +import Config from "../config.js"; +import * as TestState from "../test/test-state.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import Format from "../utils/format.js"; const textEl = document.querySelector( "#liveStatsTextBottom .liveBurst" diff --git a/frontend/src/ts/test/live-speed.ts b/frontend/src/ts/test/live-speed.ts index 8270b9330..c00bf9736 100644 --- a/frontend/src/ts/test/live-speed.ts +++ b/frontend/src/ts/test/live-speed.ts @@ -1,7 +1,7 @@ -import Config from "../config"; -import * as TestState from "./test-state"; -import * as ConfigEvent from "../observables/config-event"; -import Format from "../utils/format"; +import Config from "../config.js"; +import * as TestState from "./test-state.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import Format from "../utils/format.js"; const textElement = document.querySelector( "#liveStatsTextBottom .liveSpeed" diff --git a/frontend/src/ts/test/monkey.ts b/frontend/src/ts/test/monkey.ts index f62f2e823..b15ab206d 100644 --- a/frontend/src/ts/test/monkey.ts +++ b/frontend/src/ts/test/monkey.ts @@ -1,7 +1,7 @@ -import { mapRange } from "../utils/misc"; -import Config from "../config"; -import * as ConfigEvent from "../observables/config-event"; -import * as TestState from "../test/test-state"; +import { mapRange } from "../utils/misc.js"; +import Config from "../config.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as TestState from "../test/test-state.js"; ConfigEvent.subscribe((eventKey) => { if (eventKey === "monkey" && TestState.isActive) { diff --git a/frontend/src/ts/test/out-of-focus.ts b/frontend/src/ts/test/out-of-focus.ts index 33c9ac35f..e5bba3edd 100644 --- a/frontend/src/ts/test/out-of-focus.ts +++ b/frontend/src/ts/test/out-of-focus.ts @@ -1,4 +1,4 @@ -import * as Misc from "../utils/misc"; +import * as Misc from "../utils/misc.js"; const outOfFocusTimeouts: (number | NodeJS.Timeout)[] = []; diff --git a/frontend/src/ts/test/pace-caret.ts b/frontend/src/ts/test/pace-caret.ts index b92e99126..98218d27d 100644 --- a/frontend/src/ts/test/pace-caret.ts +++ b/frontend/src/ts/test/pace-caret.ts @@ -1,13 +1,13 @@ -import * as TestWords from "./test-words"; -import * as TestUI from "./test-ui"; -import Config from "../config"; -import * as DB from "../db"; -import * as SlowTimer from "../states/slow-timer"; -import * as Misc from "../utils/misc"; -import * as Numbers from "../utils/numbers"; -import * as JSONData from "../utils/json-data"; -import * as TestState from "./test-state"; -import * as ConfigEvent from "../observables/config-event"; +import * as TestWords from "./test-words.js"; +import * as TestUI from "./test-ui.js"; +import Config from "../config.js"; +import * as DB from "../db.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as Misc from "../utils/misc.js"; +import * as Numbers from "../utils/numbers.js"; +import * as JSONData from "../utils/json-data.js"; +import * as TestState from "./test-state.js"; +import * as ConfigEvent from "../observables/config-event.js"; type Settings = { wpm: number; diff --git a/frontend/src/ts/test/poetry.ts b/frontend/src/ts/test/poetry.ts index 5257dda1a..3179d3d98 100644 --- a/frontend/src/ts/test/poetry.ts +++ b/frontend/src/ts/test/poetry.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { Section } from "../utils/misc"; +import { Section } from "../utils/misc.js"; const bannedChars = ["—", "_", " "]; const maxWords = 100; diff --git a/frontend/src/ts/test/practise-words.ts b/frontend/src/ts/test/practise-words.ts index e3488037a..4e96682e8 100644 --- a/frontend/src/ts/test/practise-words.ts +++ b/frontend/src/ts/test/practise-words.ts @@ -1,12 +1,12 @@ -import * as TestWords from "./test-words"; -import * as Notifications from "../elements/notifications"; -import Config, * as UpdateConfig from "../config"; -import * as CustomText from "./custom-text"; -import * as TestInput from "./test-input"; -import * as ConfigEvent from "../observables/config-event"; -import { setCustomTextName } from "../states/custom-text-name"; -import * as Skeleton from "../utils/skeleton"; -import { isPopupVisible } from "../utils/misc"; +import * as TestWords from "./test-words.js"; +import * as Notifications from "../elements/notifications.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as CustomText from "./custom-text.js"; +import * as TestInput from "./test-input.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import { setCustomTextName } from "../states/custom-text-name.js"; +import * as Skeleton from "../utils/skeleton.js"; +import { isPopupVisible } from "../utils/misc.js"; const wrapperId = "practiseWordsPopupWrapper"; diff --git a/frontend/src/ts/test/replay.ts b/frontend/src/ts/test/replay.ts index e28add416..d30341e39 100644 --- a/frontend/src/ts/test/replay.ts +++ b/frontend/src/ts/test/replay.ts @@ -1,7 +1,7 @@ -import config from "../config"; -import * as Sound from "../controllers/sound-controller"; -import * as TestInput from "./test-input"; -import * as Arrays from "../utils/arrays"; +import config from "../config.js"; +import * as Sound from "../controllers/sound-controller.js"; +import * as TestInput from "./test-input.js"; +import * as Arrays from "../utils/arrays.js"; type ReplayAction = | "correctLetter" diff --git a/frontend/src/ts/test/result.ts b/frontend/src/ts/test/result.ts index 3ff7acb66..68c46601d 100644 --- a/frontend/src/ts/test/result.ts +++ b/frontend/src/ts/test/result.ts @@ -1,41 +1,41 @@ //TODO: use Format import { Chart, type PluginChartOptions } from "chart.js"; -import Config from "../config"; -import * as AdController from "../controllers/ad-controller"; -import * as ChartController from "../controllers/chart-controller"; -import QuotesController from "../controllers/quotes-controller"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import * as ThemeColors from "../elements/theme-colors"; -import { isAuthenticated } from "../firebase"; -import * as quoteRateModal from "../modals/quote-rate"; -import * as GlarsesMode from "../states/glarses-mode"; -import * as SlowTimer from "../states/slow-timer"; -import * as DateTime from "../utils/date-and-time"; -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as JSONData from "../utils/json-data"; -import * as Numbers from "../utils/numbers"; -import * as Arrays from "../utils/arrays"; -import { get as getTypingSpeedUnit } from "../utils/typing-speed-units"; -import * as FunboxList from "./funbox/funbox-list"; -import * as PbCrown from "./pb-crown"; -import * as TestConfig from "./test-config"; -import * as TestInput from "./test-input"; -import * as TestStats from "./test-stats"; -import * as TestUI from "./test-ui"; -import * as TodayTracker from "./today-tracker"; -import * as ConfigEvent from "../observables/config-event"; -import * as Focus from "./focus"; -import * as CustomText from "./custom-text"; -import * as CustomTextState from "./../states/custom-text-name"; -import * as Funbox from "./funbox/funbox"; -import Format from "../utils/format"; +import Config from "../config.js"; +import * as AdController from "../controllers/ad-controller.js"; +import * as ChartController from "../controllers/chart-controller.js"; +import QuotesController from "../controllers/quotes-controller.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import * as ThemeColors from "../elements/theme-colors.js"; +import { isAuthenticated } from "../firebase.js"; +import * as quoteRateModal from "../modals/quote-rate.js"; +import * as GlarsesMode from "../states/glarses-mode.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as DateTime from "../utils/date-and-time.js"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Numbers from "../utils/numbers.js"; +import * as Arrays from "../utils/arrays.js"; +import { get as getTypingSpeedUnit } from "../utils/typing-speed-units.js"; +import * as FunboxList from "./funbox/funbox-list.js"; +import * as PbCrown from "./pb-crown.js"; +import * as TestConfig from "./test-config.js"; +import * as TestInput from "./test-input.js"; +import * as TestStats from "./test-stats.js"; +import * as TestUI from "./test-ui.js"; +import * as TodayTracker from "./today-tracker.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as Focus from "./focus.js"; +import * as CustomText from "./custom-text.js"; +import * as CustomTextState from "./../states/custom-text-name.js"; +import * as Funbox from "./funbox/funbox.js"; +import Format from "../utils/format.js"; import confetti from "canvas-confetti"; import type { AnnotationOptions } from "chartjs-plugin-annotation"; -import Ape from "../ape"; +import Ape from "../ape.js"; let result: SharedTypes.Result<SharedTypes.Config.Mode>; let maxChartVal: number; diff --git a/frontend/src/ts/test/shift-tracker.ts b/frontend/src/ts/test/shift-tracker.ts index 627e5679e..be260f392 100644 --- a/frontend/src/ts/test/shift-tracker.ts +++ b/frontend/src/ts/test/shift-tracker.ts @@ -1,7 +1,7 @@ -import Config from "../config"; -import * as JSONData from "../utils/json-data"; -import { capsState } from "./caps-warning"; -import * as Notifications from "../elements/notifications"; +import Config from "../config.js"; +import * as JSONData from "../utils/json-data.js"; +import { capsState } from "./caps-warning.js"; +import * as Notifications from "../elements/notifications.js"; export let leftState = false; export let rightState = false; diff --git a/frontend/src/ts/test/test-config.ts b/frontend/src/ts/test/test-config.ts index fdb0a557d..79a062681 100644 --- a/frontend/src/ts/test/test-config.ts +++ b/frontend/src/ts/test/test-config.ts @@ -1,6 +1,6 @@ -import Config from "../config"; -import * as ConfigEvent from "../observables/config-event"; -import * as ActivePage from "../states/active-page"; +import Config from "../config.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as ActivePage from "../states/active-page.js"; export function show(): void { $("#testConfig").removeClass("invisible"); diff --git a/frontend/src/ts/test/test-input.ts b/frontend/src/ts/test/test-input.ts index 1a03a00e3..77ee3602b 100644 --- a/frontend/src/ts/test/test-input.ts +++ b/frontend/src/ts/test/test-input.ts @@ -1,6 +1,6 @@ -import * as TestWords from "./test-words"; -import { lastElementFromArray } from "../utils/arrays"; -import { mean, roundTo2 } from "../utils/numbers"; +import * as TestWords from "./test-words.js"; +import { lastElementFromArray } from "../utils/arrays.js"; +import { mean, roundTo2 } from "../utils/numbers.js"; const keysToTrack = [ "NumpadMultiply", diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index 8f84d3e84..bf8dc265c 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -1,63 +1,63 @@ -import Ape from "../ape"; -import * as TestUI from "./test-ui"; -import * as ManualRestart from "./manual-restart-tracker"; -import Config, * as UpdateConfig from "../config"; -import * as Strings from "../utils/strings"; -import * as Misc from "../utils/misc"; -import * as Arrays from "../utils/arrays"; -import * as JSONData from "../utils/json-data"; -import * as Numbers from "../utils/numbers"; -import * as Notifications from "../elements/notifications"; -import * as CustomText from "./custom-text"; -import * as CustomTextState from "../states/custom-text-name"; -import * as TestStats from "./test-stats"; -import * as PractiseWords from "./practise-words"; -import * as ShiftTracker from "./shift-tracker"; -import * as Focus from "./focus"; -import * as Funbox from "./funbox/funbox"; -import * as Keymap from "../elements/keymap"; -import * as ThemeController from "../controllers/theme-controller"; -import * as ResultWordHighlight from "../elements/result-word-highlight"; -import * as PaceCaret from "./pace-caret"; -import * as Caret from "./caret"; -import * as LiveSpeed from "./live-speed"; -import * as LiveAcc from "./live-acc"; -import * as LiveBurst from "./live-burst"; -import * as TimerProgress from "./timer-progress"; - -import * as TestTimer from "./test-timer"; -import * as OutOfFocus from "./out-of-focus"; -import * as AccountButton from "../elements/account-button"; -import * as DB from "../db"; -import * as Replay from "./replay"; -import * as TodayTracker from "./today-tracker"; -import * as ChallengeContoller from "../controllers/challenge-controller"; -import * as QuoteRateModal from "../modals/quote-rate"; -import * as Result from "./result"; -import * as MonkeyPower from "../elements/monkey-power"; -import * as ActivePage from "../states/active-page"; -import * as TestInput from "./test-input"; -import * as TestWords from "./test-words"; -import * as WordsGenerator from "./words-generator"; -import * as TestState from "./test-state"; -import * as ModesNotice from "../elements/modes-notice"; -import * as PageTransition from "../states/page-transition"; -import * as ConfigEvent from "../observables/config-event"; -import * as TimerEvent from "../observables/timer-event"; -import * as Last10Average from "../elements/last-10-average"; -import * as Monkey from "./monkey"; +import Ape from "../ape.js"; +import * as TestUI from "./test-ui.js"; +import * as ManualRestart from "./manual-restart-tracker.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as Strings from "../utils/strings.js"; +import * as Misc from "../utils/misc.js"; +import * as Arrays from "../utils/arrays.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Numbers from "../utils/numbers.js"; +import * as Notifications from "../elements/notifications.js"; +import * as CustomText from "./custom-text.js"; +import * as CustomTextState from "../states/custom-text-name.js"; +import * as TestStats from "./test-stats.js"; +import * as PractiseWords from "./practise-words.js"; +import * as ShiftTracker from "./shift-tracker.js"; +import * as Focus from "./focus.js"; +import * as Funbox from "./funbox/funbox.js"; +import * as Keymap from "../elements/keymap.js"; +import * as ThemeController from "../controllers/theme-controller.js"; +import * as ResultWordHighlight from "../elements/result-word-highlight.js"; +import * as PaceCaret from "./pace-caret.js"; +import * as Caret from "./caret.js"; +import * as LiveSpeed from "./live-speed.js"; +import * as LiveAcc from "./live-acc.js"; +import * as LiveBurst from "./live-burst.js"; +import * as TimerProgress from "./timer-progress.js"; + +import * as TestTimer from "./test-timer.js"; +import * as OutOfFocus from "./out-of-focus.js"; +import * as AccountButton from "../elements/account-button.js"; +import * as DB from "../db.js"; +import * as Replay from "./replay.js"; +import * as TodayTracker from "./today-tracker.js"; +import * as ChallengeContoller from "../controllers/challenge-controller.js"; +import * as QuoteRateModal from "../modals/quote-rate.js"; +import * as Result from "./result.js"; +import * as MonkeyPower from "../elements/monkey-power.js"; +import * as ActivePage from "../states/active-page.js"; +import * as TestInput from "./test-input.js"; +import * as TestWords from "./test-words.js"; +import * as WordsGenerator from "./words-generator.js"; +import * as TestState from "./test-state.js"; +import * as ModesNotice from "../elements/modes-notice.js"; +import * as PageTransition from "../states/page-transition.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as TimerEvent from "../observables/timer-event.js"; +import * as Last10Average from "../elements/last-10-average.js"; +import * as Monkey from "./monkey.js"; import objectHash from "object-hash"; -import * as AnalyticsController from "../controllers/analytics-controller"; -import { Auth, isAuthenticated } from "../firebase"; -import * as AdController from "../controllers/ad-controller"; -import * as TestConfig from "./test-config"; -import * as ConnectionState from "../states/connection"; -import * as FunboxList from "./funbox/funbox-list"; -import * as MemoryFunboxTimer from "./funbox/memory-funbox-timer"; -import * as KeymapEvent from "../observables/keymap-event"; -import * as LayoutfluidFunboxTimer from "../test/funbox/layoutfluid-funbox-timer"; -import * as ArabicLazyMode from "../states/arabic-lazy-mode"; -import Format from "../utils/format"; +import * as AnalyticsController from "../controllers/analytics-controller.js"; +import { Auth, isAuthenticated } from "../firebase.js"; +import * as AdController from "../controllers/ad-controller.js"; +import * as TestConfig from "./test-config.js"; +import * as ConnectionState from "../states/connection.js"; +import * as FunboxList from "./funbox/funbox-list.js"; +import * as MemoryFunboxTimer from "./funbox/memory-funbox-timer.js"; +import * as KeymapEvent from "../observables/keymap-event.js"; +import * as LayoutfluidFunboxTimer from "../test/funbox/layoutfluid-funbox-timer.js"; +import * as ArabicLazyMode from "../states/arabic-lazy-mode.js"; +import Format from "../utils/format.js"; let failReason = ""; const koInputVisual = document.getElementById("koInputVisual") as HTMLElement; diff --git a/frontend/src/ts/test/test-stats.ts b/frontend/src/ts/test/test-stats.ts index 1578b5a8b..5d1fba4e8 100644 --- a/frontend/src/ts/test/test-stats.ts +++ b/frontend/src/ts/test/test-stats.ts @@ -1,11 +1,11 @@ import Hangul from "hangul-js"; -import Config from "../config"; -import * as Strings from "../utils/strings"; -import * as TestInput from "./test-input"; -import * as TestWords from "./test-words"; -import * as FunboxList from "./funbox/funbox-list"; -import * as TestState from "./test-state"; -import * as Numbers from "../utils/numbers"; +import Config from "../config.js"; +import * as Strings from "../utils/strings.js"; +import * as TestInput from "./test-input.js"; +import * as TestWords from "./test-words.js"; +import * as FunboxList from "./funbox/funbox-list.js"; +import * as TestState from "./test-state.js"; +import * as Numbers from "../utils/numbers.js"; type CharCount = { spaces: number; diff --git a/frontend/src/ts/test/test-timer.ts b/frontend/src/ts/test/test-timer.ts index 0cc6b60f1..2c0d8e7a3 100644 --- a/frontend/src/ts/test/test-timer.ts +++ b/frontend/src/ts/test/test-timer.ts @@ -1,22 +1,22 @@ //most of the code is thanks to //https://stackoverflow.com/questions/29971898/how-to-create-an-accurate-timer-in-javascript -import Config, * as UpdateConfig from "../config"; -import * as CustomText from "./custom-text"; -import * as TimerProgress from "./timer-progress"; -import * as LiveWpm from "./live-speed"; -import * as TestStats from "./test-stats"; -import * as TestInput from "./test-input"; -import * as TestWords from "./test-words"; -import * as Monkey from "./monkey"; -import * as Numbers from "../utils/numbers"; -import * as Notifications from "../elements/notifications"; -import * as Caret from "./caret"; -import * as SlowTimer from "../states/slow-timer"; -import * as TestState from "./test-state"; -import * as Time from "../states/time"; -import * as TimerEvent from "../observables/timer-event"; -import * as LayoutfluidFunboxTimer from "../test/funbox/layoutfluid-funbox-timer"; +import Config, * as UpdateConfig from "../config.js"; +import * as CustomText from "./custom-text.js"; +import * as TimerProgress from "./timer-progress.js"; +import * as LiveWpm from "./live-speed.js"; +import * as TestStats from "./test-stats.js"; +import * as TestInput from "./test-input.js"; +import * as TestWords from "./test-words.js"; +import * as Monkey from "./monkey.js"; +import * as Numbers from "../utils/numbers.js"; +import * as Notifications from "../elements/notifications.js"; +import * as Caret from "./caret.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as TestState from "./test-state.js"; +import * as Time from "../states/time.js"; +import * as TimerEvent from "../observables/timer-event.js"; +import * as LayoutfluidFunboxTimer from "../test/funbox/layoutfluid-funbox-timer.js"; let slowTimerCount = 0; let timer: NodeJS.Timeout | null = null; diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index f60465a09..64accb5e2 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1,33 +1,33 @@ -import * as Notifications from "../elements/notifications"; -import * as ThemeColors from "../elements/theme-colors"; -import Config, * as UpdateConfig from "../config"; -import * as DB from "../db"; -import * as TestWords from "./test-words"; -import * as TestInput from "./test-input"; -import * as CustomText from "./custom-text"; -import * as Caret from "./caret"; -import * as OutOfFocus from "./out-of-focus"; -import * as Replay from "./replay"; -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as JSONData from "../utils/json-data"; -import * as Numbers from "../utils/numbers"; -import { blendTwoHexColors } from "../utils/colors"; -import { get as getTypingSpeedUnit } from "../utils/typing-speed-units"; -import * as SlowTimer from "../states/slow-timer"; -import * as CompositionState from "../states/composition"; -import * as ConfigEvent from "../observables/config-event"; +import * as Notifications from "../elements/notifications.js"; +import * as ThemeColors from "../elements/theme-colors.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as DB from "../db.js"; +import * as TestWords from "./test-words.js"; +import * as TestInput from "./test-input.js"; +import * as CustomText from "./custom-text.js"; +import * as Caret from "./caret.js"; +import * as OutOfFocus from "./out-of-focus.js"; +import * as Replay from "./replay.js"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as JSONData from "../utils/json-data.js"; +import * as Numbers from "../utils/numbers.js"; +import { blendTwoHexColors } from "../utils/colors.js"; +import { get as getTypingSpeedUnit } from "../utils/typing-speed-units.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as CompositionState from "../states/composition.js"; +import * as ConfigEvent from "../observables/config-event.js"; import * as Hangul from "hangul-js"; import { format } from "date-fns/format"; -import { isAuthenticated } from "../firebase"; -import { skipXpBreakdown } from "../elements/account-button"; -import * as FunboxList from "./funbox/funbox-list"; +import { isAuthenticated } from "../firebase.js"; +import { skipXpBreakdown } from "../elements/account-button.js"; +import * as FunboxList from "./funbox/funbox-list.js"; import { debounce } from "throttle-debounce"; -import * as ResultWordHighlight from "../elements/result-word-highlight"; -import * as ActivePage from "../states/active-page"; -import Format from "../utils/format"; -import * as Loader from "../elements/loader"; -import { getHtmlByUserFlags } from "../controllers/user-flag-controller"; +import * as ResultWordHighlight from "../elements/result-word-highlight.js"; +import * as ActivePage from "../states/active-page.js"; +import Format from "../utils/format.js"; +import * as Loader from "../elements/loader.js"; +import { getHtmlByUserFlags } from "../controllers/user-flag-controller.js"; async function gethtml2canvas(): Promise<typeof import("html2canvas").default> { return (await import("html2canvas")).default; diff --git a/frontend/src/ts/test/timer-progress.ts b/frontend/src/ts/test/timer-progress.ts index 9579818cf..e9da57cfe 100644 --- a/frontend/src/ts/test/timer-progress.ts +++ b/frontend/src/ts/test/timer-progress.ts @@ -1,12 +1,12 @@ -import Config from "../config"; -import * as CustomText from "./custom-text"; -import * as DateTime from "../utils/date-and-time"; -import * as TestWords from "./test-words"; -import * as TestInput from "./test-input"; -import * as Time from "../states/time"; -import * as SlowTimer from "../states/slow-timer"; -import * as TestState from "./test-state"; -import * as ConfigEvent from "../observables/config-event"; +import Config from "../config.js"; +import * as CustomText from "./custom-text.js"; +import * as DateTime from "../utils/date-and-time.js"; +import * as TestWords from "./test-words.js"; +import * as TestInput from "./test-input.js"; +import * as Time from "../states/time.js"; +import * as SlowTimer from "../states/slow-timer.js"; +import * as TestState from "./test-state.js"; +import * as ConfigEvent from "../observables/config-event.js"; const barEl = $("#barTimerProgress .bar"); const barOpacityEl = $("#barTimerProgress .opacityWrapper"); diff --git a/frontend/src/ts/test/today-tracker.ts b/frontend/src/ts/test/today-tracker.ts index 592d2077d..122bac03c 100644 --- a/frontend/src/ts/test/today-tracker.ts +++ b/frontend/src/ts/test/today-tracker.ts @@ -1,5 +1,5 @@ -import * as DateTime from "../utils/date-and-time"; -import * as DB from "../db"; +import * as DateTime from "../utils/date-and-time.js"; +import * as DB from "../db.js"; let seconds = 0; let addedAllToday = false; diff --git a/frontend/src/ts/test/tts.ts b/frontend/src/ts/test/tts.ts index 27b9dd98c..381920982 100644 --- a/frontend/src/ts/test/tts.ts +++ b/frontend/src/ts/test/tts.ts @@ -1,7 +1,7 @@ -import Config from "../config"; -import * as JSONData from "../utils/json-data"; -import * as ConfigEvent from "../observables/config-event"; -import * as TTSEvent from "../observables/tts-event"; +import Config from "../config.js"; +import * as JSONData from "../utils/json-data.js"; +import * as ConfigEvent from "../observables/config-event.js"; +import * as TTSEvent from "../observables/tts-event.js"; let voice: SpeechSynthesisUtterance | undefined; diff --git a/frontend/src/ts/test/weak-spot.ts b/frontend/src/ts/test/weak-spot.ts index b248ddb6f..8d3ad543b 100644 --- a/frontend/src/ts/test/weak-spot.ts +++ b/frontend/src/ts/test/weak-spot.ts @@ -1,5 +1,5 @@ -import * as TestInput from "./test-input"; -import { Wordset } from "./wordset"; +import * as TestInput from "./test-input.js"; +import { Wordset } from "./wordset.js"; // Changes how quickly it 'learns' scores - very roughly the score for a char // is based on last perCharCount occurrences. Make it smaller to adjust faster. diff --git a/frontend/src/ts/test/wikipedia.ts b/frontend/src/ts/test/wikipedia.ts index 2e74959ad..d5590e2e6 100644 --- a/frontend/src/ts/test/wikipedia.ts +++ b/frontend/src/ts/test/wikipedia.ts @@ -1,8 +1,8 @@ -import * as Loader from "../elements/loader"; -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as JSONData from "../utils/json-data"; -import { Section } from "../utils/misc"; +import * as Loader from "../elements/loader.js"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as JSONData from "../utils/json-data.js"; +import { Section } from "../utils/misc.js"; export async function getTLD( languageGroup: MonkeyTypes.LanguageGroup diff --git a/frontend/src/ts/test/words-generator.ts b/frontend/src/ts/test/words-generator.ts index 4c2d17092..2dfcf5956 100644 --- a/frontend/src/ts/test/words-generator.ts +++ b/frontend/src/ts/test/words-generator.ts @@ -1,18 +1,18 @@ -import Config, * as UpdateConfig from "../config"; -import * as FunboxList from "./funbox/funbox-list"; -import * as CustomText from "./custom-text"; -import * as Wordset from "./wordset"; -import QuotesController from "../controllers/quotes-controller"; -import * as TestWords from "./test-words"; -import * as BritishEnglish from "./british-english"; -import * as LazyMode from "./lazy-mode"; -import * as EnglishPunctuation from "./english-punctuation"; -import * as PractiseWords from "./practise-words"; -import * as Misc from "../utils/misc"; -import * as Strings from "../utils/strings"; -import * as Arrays from "../utils/arrays"; -import * as TestState from "../test/test-state"; -import * as GetText from "../utils/generate"; +import Config, * as UpdateConfig from "../config.js"; +import * as FunboxList from "./funbox/funbox-list.js"; +import * as CustomText from "./custom-text.js"; +import * as Wordset from "./wordset.js"; +import QuotesController from "../controllers/quotes-controller.js"; +import * as TestWords from "./test-words.js"; +import * as BritishEnglish from "./british-english.js"; +import * as LazyMode from "./lazy-mode.js"; +import * as EnglishPunctuation from "./english-punctuation.js"; +import * as PractiseWords from "./practise-words.js"; +import * as Misc from "../utils/misc.js"; +import * as Strings from "../utils/strings.js"; +import * as Arrays from "../utils/arrays.js"; +import * as TestState from "../test/test-state.js"; +import * as GetText from "../utils/generate.js"; function shouldCapitalize(lastChar: string): boolean { return /[?!.؟]/.test(lastChar); diff --git a/frontend/src/ts/test/wordset.ts b/frontend/src/ts/test/wordset.ts index 377f919df..00af55b8b 100644 --- a/frontend/src/ts/test/wordset.ts +++ b/frontend/src/ts/test/wordset.ts @@ -1,7 +1,7 @@ -import * as FunboxList from "./funbox/funbox-list"; -import { zipfyRandomArrayIndex } from "../utils/misc"; -import { randomElementFromArray, shuffle } from "../utils/arrays"; -import Config from "../config"; +import * as FunboxList from "./funbox/funbox-list.js"; +import { zipfyRandomArrayIndex } from "../utils/misc.js"; +import { randomElementFromArray, shuffle } from "../utils/arrays.js"; +import Config from "../config.js"; let currentWordset: MonkeyTypes.Wordset | null = null; diff --git a/frontend/src/ts/ui.ts b/frontend/src/ts/ui.ts index 98ed68613..c59eb846f 100644 --- a/frontend/src/ts/ui.ts +++ b/frontend/src/ts/ui.ts @@ -1,14 +1,14 @@ -import Config from "./config"; -import * as Caret from "./test/caret"; -import * as Notifications from "./elements/notifications"; -import * as CustomText from "./test/custom-text"; -import * as TestState from "./test/test-state"; -import * as ConfigEvent from "./observables/config-event"; +import Config from "./config.js"; +import * as Caret from "./test/caret.js"; +import * as Notifications from "./elements/notifications.js"; +import * as CustomText from "./test/custom-text.js"; +import * as TestState from "./test/test-state.js"; +import * as ConfigEvent from "./observables/config-event.js"; import { debounce, throttle } from "throttle-debounce"; -import * as TestUI from "./test/test-ui"; -import { get as getActivePage } from "./states/active-page"; -import { canQuickRestart, isDevEnvironment } from "./utils/misc"; -import { isCustomTextLong } from "./states/custom-text-name"; +import * as TestUI from "./test/test-ui.js"; +import { get as getActivePage } from "./states/active-page.js"; +import { canQuickRestart, isDevEnvironment } from "./utils/misc.js"; +import { isCustomTextLong } from "./states/custom-text-name.js"; let isPreviewingFont = false; export function previewFontFamily(font: string): void { diff --git a/frontend/src/ts/utils/animated-modal.ts b/frontend/src/ts/utils/animated-modal.ts index 04550723f..3178cf810 100644 --- a/frontend/src/ts/utils/animated-modal.ts +++ b/frontend/src/ts/utils/animated-modal.ts @@ -1,5 +1,5 @@ -import { isPopupVisible } from "./misc"; -import * as Skeleton from "./skeleton"; +import { isPopupVisible } from "./misc.js"; +import * as Skeleton from "./skeleton.js"; type CustomAnimation = { from: Record<string, string>; diff --git a/frontend/src/ts/utils/arrays.ts b/frontend/src/ts/utils/arrays.ts index 1dec3ce0d..4723200a7 100644 --- a/frontend/src/ts/utils/arrays.ts +++ b/frontend/src/ts/utils/arrays.ts @@ -1,4 +1,4 @@ -import { randomIntFromRange } from "./numbers"; +import { randomIntFromRange } from "./numbers.js"; /** * Applies a smoothing algorithm to an array of numbers. diff --git a/frontend/src/ts/utils/async-modules.ts b/frontend/src/ts/utils/async-modules.ts index 212a17d49..c498254ba 100644 --- a/frontend/src/ts/utils/async-modules.ts +++ b/frontend/src/ts/utils/async-modules.ts @@ -1,7 +1,7 @@ -import * as Loader from "../elements/loader"; -import * as Notifications from "../elements/notifications"; -import { createErrorMessage } from "./misc"; -import * as Skeleton from "../utils/skeleton"; +import * as Loader from "../elements/loader.js"; +import * as Notifications from "../elements/notifications.js"; +import { createErrorMessage } from "./misc.js"; +import * as Skeleton from "../utils/skeleton.js"; Skeleton.save("commandLine"); diff --git a/frontend/src/ts/utils/config.ts b/frontend/src/ts/utils/config.ts index 169e04def..cb1406e56 100644 --- a/frontend/src/ts/utils/config.ts +++ b/frontend/src/ts/utils/config.ts @@ -1,5 +1,5 @@ -import DefaultConfig from "../constants/default-config"; -import { typedKeys } from "./misc"; +import DefaultConfig from "../constants/default-config.js"; +import { typedKeys } from "./misc.js"; export function mergeWithDefaultConfig( config: Partial<SharedTypes.Config> diff --git a/frontend/src/ts/utils/date-and-time.ts b/frontend/src/ts/utils/date-and-time.ts index a5f8cbcd1..24abb53c0 100644 --- a/frontend/src/ts/utils/date-and-time.ts +++ b/frontend/src/ts/utils/date-and-time.ts @@ -1,4 +1,4 @@ -import { roundTo2 } from "./numbers"; +import { roundTo2 } from "./numbers.js"; /** * Returns the current day's timestamp adjusted by the hour offset. diff --git a/frontend/src/ts/utils/format.ts b/frontend/src/ts/utils/format.ts index 02e520585..87e9b4261 100644 --- a/frontend/src/ts/utils/format.ts +++ b/frontend/src/ts/utils/format.ts @@ -1,6 +1,6 @@ -import Config from "../config"; -import { get as getTypingSpeedUnit } from "../utils/typing-speed-units"; -import * as Numbers from "../utils/numbers"; +import Config from "../config.js"; +import { get as getTypingSpeedUnit } from "../utils/typing-speed-units.js"; +import * as Numbers from "../utils/numbers.js"; export type FormatOptions = { showDecimalPlaces?: boolean; diff --git a/frontend/src/ts/utils/generate.ts b/frontend/src/ts/utils/generate.ts index e9e033341..8c512d3ec 100644 --- a/frontend/src/ts/utils/generate.ts +++ b/frontend/src/ts/utils/generate.ts @@ -1,6 +1,6 @@ -import { randomIntFromRange } from "./numbers"; -import * as Arrays from "./arrays"; -import * as Strings from "./strings"; +import { randomIntFromRange } from "./numbers.js"; +import * as Arrays from "./arrays.js"; +import * as Strings from "./strings.js"; /** * Generates a random binary string of length 8. diff --git a/frontend/src/ts/utils/json-data.ts b/frontend/src/ts/utils/json-data.ts index 66b5a4bcb..4cdbf4515 100644 --- a/frontend/src/ts/utils/json-data.ts +++ b/frontend/src/ts/utils/json-data.ts @@ -1,4 +1,4 @@ -import { hexToHSL } from "./colors"; +import { hexToHSL } from "./colors.js"; /** * Fetches JSON data from the specified URL using the fetch API. diff --git a/frontend/src/ts/utils/logger.ts b/frontend/src/ts/utils/logger.ts index 448583deb..f991723f9 100644 --- a/frontend/src/ts/utils/logger.ts +++ b/frontend/src/ts/utils/logger.ts @@ -1,4 +1,4 @@ -import { isDevEnvironment } from "./misc"; +import { isDevEnvironment } from "./misc.js"; const nativeLog = console.log; const nativeWarn = console.warn; diff --git a/frontend/src/ts/utils/misc.ts b/frontend/src/ts/utils/misc.ts index e81a25985..86b535978 100644 --- a/frontend/src/ts/utils/misc.ts +++ b/frontend/src/ts/utils/misc.ts @@ -1,7 +1,7 @@ -import * as Loader from "../elements/loader"; -import { envConfig } from "../constants/env-config"; -import { lastElementFromArray } from "./arrays"; -import * as JSONData from "./json-data"; +import * as Loader from "../elements/loader.js"; +import { envConfig } from "../constants/env-config.js"; +import { lastElementFromArray } from "./arrays.js"; +import * as JSONData from "./json-data.js"; export function kogasa(cov: number): number { return ( diff --git a/frontend/src/ts/utils/url-handler.ts b/frontend/src/ts/utils/url-handler.ts index 87de976d8..e4072ec59 100644 --- a/frontend/src/ts/utils/url-handler.ts +++ b/frontend/src/ts/utils/url-handler.ts @@ -1,17 +1,17 @@ -import * as Misc from "./misc"; -import Config, * as UpdateConfig from "../config"; -import * as Notifications from "../elements/notifications"; +import * as Misc from "./misc.js"; +import Config, * as UpdateConfig from "../config.js"; +import * as Notifications from "../elements/notifications.js"; import { decompressFromURI } from "lz-ts"; -import * as TestState from "../test/test-state"; -import * as ManualRestart from "../test/manual-restart-tracker"; -import * as CustomText from "../test/custom-text"; -import Ape from "../ape"; -import * as Settings from "../pages/settings"; -import * as DB from "../db"; -import * as Loader from "../elements/loader"; -import * as AccountButton from "../elements/account-button"; -import { restart as restartTest } from "../test/test-logic"; -import * as ChallengeController from "../controllers/challenge-controller"; +import * as TestState from "../test/test-state.js"; +import * as ManualRestart from "../test/manual-restart-tracker.js"; +import * as CustomText from "../test/custom-text.js"; +import Ape from "../ape.js"; +import * as Settings from "../pages/settings.js"; +import * as DB from "../db.js"; +import * as Loader from "../elements/loader.js"; +import * as AccountButton from "../elements/account-button.js"; +import { restart as restartTest } from "../test/test-logic.js"; +import * as ChallengeController from "../controllers/challenge-controller.js"; export async function linkDiscord(hashOverride: string): Promise<void> { if (!hashOverride) return; |