aboutsummaryrefslogtreecommitdiff
path: root/webAO/utils
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2025-09-03 17:37:36 +0200
committerGitHub <noreply@github.com>2025-09-03 17:37:36 +0200
commit0d2a3994e203755702ebe4afbd0f3c721ee8ce38 (patch)
tree9347303eaa9daad5e10420ab1d90e24593c70df1 /webAO/utils
parent8e46e304f4defc7f9f4eb01922812b28a8585307 (diff)
parent035951baf3819f56093f7156b345689aa5093f28 (diff)
Merge pull request #270 from AttorneyOnline/ext
Let the webhost specify the extensions use
Diffstat (limited to 'webAO/utils')
-rw-r--r--webAO/utils/tryUrls.ts15
1 files changed, 0 insertions, 15 deletions
diff --git a/webAO/utils/tryUrls.ts b/webAO/utils/tryUrls.ts
deleted file mode 100644
index 127bc5b..0000000
--- a/webAO/utils/tryUrls.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import fileExists from "./fileExists";
-import transparentPng from "../constants/transparentPng";
-const urlExtensionsToTry = [".png", ".gif", ".webp", ".apng"];
-const tryUrls = async (url: string) => {
- for (let i = 0; i < urlExtensionsToTry.length; i++) {
- const extension = urlExtensionsToTry[i];
- const fullFileUrl = url + extension;
- const exists = await fileExists(fullFileUrl);
- if (exists) {
- return fullFileUrl;
- }
- }
- return transparentPng;
-};
-export default tryUrls;