From 43f826ede1d88467601928a83857d1c84d9d4221 Mon Sep 17 00:00:00 2001 From: stonedDiscord Date: Thu, 2 Oct 2025 23:18:49 +0200 Subject: use the file for previews --- webAO/dom/updateBackgroundPreview.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'webAO/dom') diff --git a/webAO/dom/updateBackgroundPreview.ts b/webAO/dom/updateBackgroundPreview.ts index 2b8a18b..57073b4 100644 --- a/webAO/dom/updateBackgroundPreview.ts +++ b/webAO/dom/updateBackgroundPreview.ts @@ -1,11 +1,11 @@ +import { client } from "../client"; import { AO_HOST } from "../client/aoHost"; import fileExists from "../utils/fileExists"; import transparentPng from "../constants/transparentPng"; -const urlExtensionsToTry = [".png", ".gif", ".webp", ".apng"]; const tryBackgroundUrls = async (url: string) => { - for (let i = 0; i < urlExtensionsToTry.length; i++) { - const extension = urlExtensionsToTry[i]; + for (let i = 0; i < client.background_extensions.length; i++) { + const extension = client.background_extensions[i]; const fullFileUrl = url + extension; const exists = await fileExists(fullFileUrl); if (exists) { -- cgit