diff --git a/frontend/src/ts/commandline/index.ts b/frontend/src/ts/commandline/index.ts index 396d387f2..f5f17f7d3 100644 --- a/frontend/src/ts/commandline/index.ts +++ b/frontend/src/ts/commandline/index.ts @@ -49,7 +49,7 @@ function showInput( } } -export function isSingleListCommandLineActive(): boolean { +function isSingleListCommandLineActive(): boolean { return state["usingSingleList"]; } @@ -223,7 +223,7 @@ function updateSuggested(): void { updateActiveEntry(); } -export let show = (): void => { +let show = (): void => { themeChosen = false; activeIndex = 0; commandLineMouseMode = false; diff --git a/frontend/src/ts/commandline/lists/custom-theme.ts b/frontend/src/ts/commandline/lists/custom-theme.ts index 37a80bb22..34a47b2ae 100644 --- a/frontend/src/ts/commandline/lists/custom-theme.ts +++ b/frontend/src/ts/commandline/lists/custom-theme.ts @@ -1,6 +1,6 @@ import * as UpdateConfig from "../../config"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom theme", configKey: "customTheme", list: [ diff --git a/frontend/src/ts/commandline/lists/custom-themes-list.ts b/frontend/src/ts/commandline/lists/custom-themes-list.ts index 99953b209..0c1b81f01 100644 --- a/frontend/src/ts/commandline/lists/custom-themes-list.ts +++ b/frontend/src/ts/commandline/lists/custom-themes-list.ts @@ -3,7 +3,7 @@ import { Auth } from "../../firebase"; import * as DB from "../../db"; import * as ThemeController from "../../controllers/theme-controller"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Custom themes list...", // configKey: "customThemeId", beforeList: (): void => update(), diff --git a/frontend/src/ts/commandline/lists/enable-ads.ts b/frontend/src/ts/commandline/lists/enable-ads.ts index c2fb74285..f7bc8fdd1 100644 --- a/frontend/src/ts/commandline/lists/enable-ads.ts +++ b/frontend/src/ts/commandline/lists/enable-ads.ts @@ -1,6 +1,6 @@ import * as UpdateConfig from "../../config"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Set enable ads...", configKey: "ads", list: [ diff --git a/frontend/src/ts/commandline/lists/keymap-layouts.ts b/frontend/src/ts/commandline/lists/keymap-layouts.ts index 5db9a26fd..e862c23df 100644 --- a/frontend/src/ts/commandline/lists/keymap-layouts.ts +++ b/frontend/src/ts/commandline/lists/keymap-layouts.ts @@ -2,7 +2,7 @@ import * as UpdateConfig from "../../config"; import * as TestLogic from "../../test/test-logic"; import { capitalizeFirstLetterOfEachWord } from "../../utils/misc"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Change keymap layout...", configKey: "keymapLayout", list: [ diff --git a/frontend/src/ts/commandline/lists/load-challenge.ts b/frontend/src/ts/commandline/lists/load-challenge.ts index 09c893459..eab53b174 100644 --- a/frontend/src/ts/commandline/lists/load-challenge.ts +++ b/frontend/src/ts/commandline/lists/load-challenge.ts @@ -3,7 +3,7 @@ import * as ChallengeController from "../../controllers/challenge-controller"; import * as TestLogic from "../../test/test-logic"; import { capitalizeFirstLetterOfEachWord } from "../../utils/misc"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Load challenge...", list: [], }; diff --git a/frontend/src/ts/commandline/lists/presets.ts b/frontend/src/ts/commandline/lists/presets.ts index ad9cc592b..c945e713f 100644 --- a/frontend/src/ts/commandline/lists/presets.ts +++ b/frontend/src/ts/commandline/lists/presets.ts @@ -56,4 +56,3 @@ function update(): void { } export default commands; -export { update }; diff --git a/frontend/src/ts/commandline/lists/themes.ts b/frontend/src/ts/commandline/lists/themes.ts index 8c5d98d5a..f56f6673a 100644 --- a/frontend/src/ts/commandline/lists/themes.ts +++ b/frontend/src/ts/commandline/lists/themes.ts @@ -2,7 +2,7 @@ import Config, * as UpdateConfig from "../../config"; import { capitalizeFirstLetterOfEachWord } from "../../utils/misc"; import * as ThemeController from "../../controllers/theme-controller"; -export const subgroup: MonkeyTypes.CommandsSubgroup = { +const subgroup: MonkeyTypes.CommandsSubgroup = { title: "Theme...", configKey: "theme", list: [], diff --git a/frontend/src/ts/config-validation.ts b/frontend/src/ts/config-validation.ts index 77ddd5eec..d9ed77291 100644 --- a/frontend/src/ts/config-validation.ts +++ b/frontend/src/ts/config-validation.ts @@ -14,11 +14,11 @@ type PossibleType = type PossibleTypeAsync = "layoutfluid"; -export function isConfigKeyValid(name: string): boolean { - if (name === null || name === undefined || name === "") return false; - if (name.length > 30) return false; - return /^[0-9a-zA-Z_.\-#+]+$/.test(name); -} +// function isConfigKeyValid(name: string): boolean { +// if (name === null || name === undefined || name === "") return false; +// if (name.length > 30) return false; +// return /^[0-9a-zA-Z_.\-#+]+$/.test(name); +// } function invalid(key: string, val: unknown, customMessage?: string): void { if (customMessage === undefined) { diff --git a/frontend/src/ts/popups/google-sign-up-popup.ts b/frontend/src/ts/popups/google-sign-up-popup.ts index f28b66579..c263a01df 100644 --- a/frontend/src/ts/popups/google-sign-up-popup.ts +++ b/frontend/src/ts/popups/google-sign-up-popup.ts @@ -23,7 +23,7 @@ const wrapperId = "googleSignUpPopupWrapper"; let signedInUser: UserCredential | undefined = undefined; -export function show(credential: UserCredential): void { +function show(credential: UserCredential): void { Skeleton.append(wrapperId); if (!isPopupVisible(wrapperId)) { @@ -45,7 +45,7 @@ export function show(credential: UserCredential): void { } } -export async function hide(): Promise { +async function hide(): Promise { if (isPopupVisible(wrapperId)) { if (signedInUser !== undefined) { Notifications.add("Sign up process canceled", 0, { diff --git a/frontend/src/ts/popups/mobile-test-config-popup.ts b/frontend/src/ts/popups/mobile-test-config-popup.ts index a5ab014b8..d0b3f0a56 100644 --- a/frontend/src/ts/popups/mobile-test-config-popup.ts +++ b/frontend/src/ts/popups/mobile-test-config-popup.ts @@ -13,7 +13,7 @@ const wrapperId = "mobileTestConfigPopupWrapper"; const el = $("#mobileTestConfigPopup"); -export function update(): void { +function update(): void { el.find(".button").removeClass("active"); el.find(`.modeGroup .button[mode='${Config.mode}']`).addClass("active"); diff --git a/frontend/src/ts/popups/new-result-filter-preset-popup.ts b/frontend/src/ts/popups/new-result-filter-preset-popup.ts index b251f8bcf..e7d4e1cd7 100644 --- a/frontend/src/ts/popups/new-result-filter-preset-popup.ts +++ b/frontend/src/ts/popups/new-result-filter-preset-popup.ts @@ -6,7 +6,7 @@ const wrapperId = "newResultFilterPresetPopupWrapper"; // the function to call after name is inputed by user let callbackFunc: ((name: string) => void) | null = null; -export function show(): void { +function show(): void { Skeleton.append(wrapperId); if (!isPopupVisible(wrapperId)) { @@ -22,7 +22,7 @@ export function show(): void { } } -export function hide(): void { +function hide(): void { if (isPopupVisible(wrapperId)) { $("#newResultFilterPresetPopupWrapper") .stop(true, true) diff --git a/frontend/src/ts/popups/set-streak-hour-offset.ts b/frontend/src/ts/popups/set-streak-hour-offset.ts index 26761d25f..caf0acc73 100644 --- a/frontend/src/ts/popups/set-streak-hour-offset.ts +++ b/frontend/src/ts/popups/set-streak-hour-offset.ts @@ -10,7 +10,7 @@ import { getSnapshot, setSnapshot } from "../db"; const wrapperId = "streakHourOffsetPopupWrapper"; -export function show(): void { +function show(): void { if (!ConnectionState.get()) { Notifications.add("You are offline", 0, { duration: 2, diff --git a/frontend/src/ts/popups/simple-popups.ts b/frontend/src/ts/popups/simple-popups.ts index 940b73177..dfa567b35 100644 --- a/frontend/src/ts/popups/simple-popups.ts +++ b/frontend/src/ts/popups/simple-popups.ts @@ -38,7 +38,7 @@ interface Input { let activePopup: SimplePopup | null = null; -export const list: { [key: string]: SimplePopup } = {}; +const list: { [key: string]: SimplePopup } = {}; class SimplePopup { parameters: string[]; wrapper: JQuery; @@ -239,7 +239,7 @@ class SimplePopup { } } -export function hide(): void { +function hide(): void { if (activePopup) return activePopup.hide(); $("#simplePopupWrapper") .stop(true, true) diff --git a/frontend/src/ts/popups/version-popup.ts b/frontend/src/ts/popups/version-popup.ts index 43fb84d05..da3f187bd 100644 --- a/frontend/src/ts/popups/version-popup.ts +++ b/frontend/src/ts/popups/version-popup.ts @@ -4,7 +4,7 @@ import * as Skeleton from "./skeleton"; const wrapperId = "versionHistoryWrapper"; -export function show(): void { +function show(): void { Skeleton.append(wrapperId); $("#versionHistory").html(`
diff --git a/frontend/src/ts/ui.ts b/frontend/src/ts/ui.ts index 8abf9c5b4..4ab529d3c 100644 --- a/frontend/src/ts/ui.ts +++ b/frontend/src/ts/ui.ts @@ -9,7 +9,7 @@ import * as TestUI from "./test/test-ui"; import { get as getActivePage } from "./states/active-page"; import { isLocalhost } from "./utils/misc"; -export function updateKeytips(): void { +function updateKeytips(): void { const modifierKey = window.navigator.userAgent.toLowerCase().includes("mac") ? "cmd" : "ctrl";