diff options
Diffstat (limited to 'webAO/dom')
| -rw-r--r-- | webAO/dom/updateBackgroundPreview.ts | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |
