diff options
Diffstat (limited to 'webAO/client/fetchLists.ts')
| -rw-r--r-- | webAO/client/fetchLists.ts | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/webAO/client/fetchLists.ts b/webAO/client/fetchLists.ts index 2489c97..2aff60a 100644 --- a/webAO/client/fetchLists.ts +++ b/webAO/client/fetchLists.ts @@ -50,8 +50,6 @@ export const fetchEvidenceList = async () => { try { const evidata = await request(`${AO_HOST}evidence.json`); const evi_array = JSON.parse(evidata); - // the try catch will fail before here when there is no file - evi_array.forEach((evi: string) => { evi_select.add(new Option(evi)); }); @@ -64,8 +62,18 @@ export const fetchManifest = async () => { try { const manifestdata = await request(`${AO_HOST}manifest.txt`); client.manifest = manifestdata.split(/\r\n|\n\r|\n|\r/); - // the try catch will fail before here when there is no file } catch (err) { console.warn("there was no manifest.txt file"); } }; + +export const fetchExtensions = async () => { + try { + const extensiondata = await request(`${AO_HOST}extensions.json`); + const allextensions = JSON.parse(extensiondata); + client.charicon_extensions = allextensions.charicon_extensions|| [".png", ".webp"]; + client.emote_extensions = allextensions.emote_extensions || [".gif", ".png", ".apng", ".webp", ".webp.static"]; + } catch (err) { + console.warn("there was no extensions.json file"); + } +}; |
