From 1a990ef6ec7025970e4ec08a73551dca9f68dd63 Mon Sep 17 00:00:00 2001 From: Lalle <29478339+LalleSX@users.noreply.github.com> Date: Fri, 28 Apr 2023 23:43:22 +0200 Subject: [PATCH] added fcx and tegaki to globals window --- src/globals/globals.ts | 60 +++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 27 deletions(-) diff --git a/src/globals/globals.ts b/src/globals/globals.ts index 107ef69..fd13776 100644 --- a/src/globals/globals.ts +++ b/src/globals/globals.ts @@ -5,57 +5,63 @@ import type SimpleDict from "../classes/SimpleDict" import type Thread from "../classes/Thread" import type SWTinyboard from "../site/SW.tinyboard" +declare global { + interface Window { + Tegaki: any + FCX: any + } +} // interfaces might be incomplete export interface BoardConfig { - board: string + board: string bump_limit: number cooldowns: { threads: number, replies: number, - images: number, + images: number, } - custom_spoilers: 1 | 0, - image_limit: number, - is_archived: 1 | 0, + custom_spoilers: 1 | 0, + image_limit: number, + is_archived: 1 | 0, max_comment_chars: number - max_filesize: number + max_filesize: number max_webm_duration: number max_webm_filesize: number - meta_description: string, - pages: number, - per_page: number, - spoilers: number, - title: string - ws_board: 1 | 0 + meta_description: string, + pages: number, + per_page: number, + spoilers: number, + title: string + ws_board: 1 | 0 } export interface Board { - ID: string, + ID: string, boardID: string, - siteID: string, - config: BoardConfig, - posts: SimpleDict, + siteID: string, + config: BoardConfig, + posts: SimpleDict, threads: SimpleDict, } export const Conf = Object.create(null) export const g: { - VERSION: string, + VERSION: string, NAMESPACE: string, - sites: (typeof SWTinyboard)[], - boards: Board[], - posts?: SimpleDict, - threads?: SimpleDict + sites: (typeof SWTinyboard)[], + boards: Board[], + posts?: SimpleDict, + threads?: SimpleDict THREADID?: number, - SITE?: typeof SWTinyboard, - BOARD?: Board, - VIEW?: string, + SITE?: typeof SWTinyboard, + BOARD?: Board, + VIEW?: string, } = { - VERSION: version.version, + VERSION: version.version, NAMESPACE: meta.name, - sites: Object.create(null), - boards: Object.create(null) + sites: Object.create(null), + boards: Object.create(null) } export const E = (function () {