From 3162071cb27510954dde918af629ed5d75deb583 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 08:39:19 +0200 Subject: get list of extensions to try from host --- webAO/client.ts | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 4d8390a..28679c0 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -151,6 +151,8 @@ class Client extends EventEmitter { connect: () => void; loadResources: () => void; isLowMemory: () => void; + charicon_extensions: string[]; + emote_extensions: string[]; constructor(connectionString: string) { super(); @@ -209,6 +211,8 @@ class Client extends EventEmitter { this.temp_packet = ""; loadResources; isLowMemory; + this.charicon_extensions = [".png", ".webp"]; + this.emote_extensions = [".gif", ".png", ".apng", ".webp", ".webp.static"]; } /** -- cgit From c2ce0abe8af72603ad35761cb798fdd1aff01c85 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 09:20:22 +0200 Subject: fetch em --- webAO/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 28679c0..46f4ba9 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -19,6 +19,7 @@ import { fetchBackgroundList, fetchEvidenceList, fetchCharacterList, + fetchExtensions, } from "./client/fetchLists"; import getCookie from "./utils/getCookie"; import setCookie from "./utils/setCookie"; @@ -408,7 +409,7 @@ class Client extends EventEmitter { resetAreaList() { this.areas = []; document.getElementById("areas").innerHTML = ""; - + fetchExtensions(); fetchBackgroundList(); fetchEvidenceList(); fetchCharacterList(); -- cgit From e58dcb7186bb3c80ba87279a6643fcb4b8b3b2be Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 10:27:49 +0200 Subject: emotions --- webAO/client.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 46f4ba9..27861de 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -154,6 +154,7 @@ class Client extends EventEmitter { isLowMemory: () => void; charicon_extensions: string[]; emote_extensions: string[]; + emotions_extensions: string[]; constructor(connectionString: string) { super(); @@ -214,6 +215,7 @@ class Client extends EventEmitter { isLowMemory; this.charicon_extensions = [".png", ".webp"]; this.emote_extensions = [".gif", ".png", ".apng", ".webp", ".webp.static"]; + this.emotions_extensions = [".png", ".webp"]; } /** -- cgit From d8d2fbc8b7bf91dbedc7042daa1081ebd0d1330f Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 11:04:17 +0200 Subject: also get backgrounds --- webAO/client.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 27861de..4cceb98 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -102,6 +102,7 @@ fpPromise client.hdid = hdid; isLowMemory(); loadResources(); + fetchExtensions(); }); export const delay = (ms: number) => new Promise((res) => setTimeout(res, ms)); @@ -155,6 +156,7 @@ class Client extends EventEmitter { charicon_extensions: string[]; emote_extensions: string[]; emotions_extensions: string[]; + background_extensions: string[]; constructor(connectionString: string) { super(); @@ -213,9 +215,10 @@ class Client extends EventEmitter { this.temp_packet = ""; loadResources; isLowMemory; - this.charicon_extensions = [".png", ".webp"]; - this.emote_extensions = [".gif", ".png", ".apng", ".webp", ".webp.static"]; - this.emotions_extensions = [".png", ".webp"]; + this.charicon_extensions = []; + this.emote_extensions = []; + this.emotions_extensions = []; + this.background_extensions = []; } /** @@ -411,7 +414,6 @@ class Client extends EventEmitter { resetAreaList() { this.areas = []; document.getElementById("areas").innerHTML = ""; - fetchExtensions(); fetchBackgroundList(); fetchEvidenceList(); fetchCharacterList(); -- cgit From a2ac0577dc5bb9ef345f3ef04e0eb842020db404 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 14:10:20 +0200 Subject: move up --- webAO/client.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 4cceb98..177d9a3 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -98,11 +98,11 @@ fpPromise } client = new Client(connectionString); + fetchExtensions(); client.connect(); client.hdid = hdid; isLowMemory(); loadResources(); - fetchExtensions(); }); export const delay = (ms: number) => new Promise((res) => setTimeout(res, ms)); -- cgit From c9dd3b460d81923b89795bf4e220dd7095584c04 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 14:18:23 +0200 Subject: defaults needed to pass test --- webAO/client.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 177d9a3..8c842f8 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -215,10 +215,10 @@ class Client extends EventEmitter { this.temp_packet = ""; loadResources; isLowMemory; - this.charicon_extensions = []; - this.emote_extensions = []; - this.emotions_extensions = []; - this.background_extensions = []; + this.charicon_extensions = [".png", ".webp"]; + this.emote_extensions = [".gif", ".png", ".apng", ".webp", ".webp.static"]; + this.emotions_extensions = [".png", ".webp"]; + this.background_extensions = [".png", ".gif"];; } /** -- cgit From 035951baf3819f56093f7156b345689aa5093f28 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Wed, 3 Sep 2025 14:20:28 +0200 Subject: remove failed manifesto --- webAO/client.ts | 2 -- 1 file changed, 2 deletions(-) (limited to 'webAO/client.ts') diff --git a/webAO/client.ts b/webAO/client.ts index 8c842f8..40884ff 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -145,7 +145,6 @@ class Client extends EventEmitter { sender: ISender; checkUpdater: any; _lastTimeICReceived: any; - manifest: string[]; viewport: Viewport; partial_packet: boolean; temp_packet: string; @@ -203,7 +202,6 @@ class Client extends EventEmitter { this.musics = []; this.musics_time = false; this.callwords = []; - this.manifest = []; this.resources = getResources(AO_HOST, theme); this.selectedEmote = -1; this.selectedEvidence = -1; -- cgit