diff options
Diffstat (limited to 'webAO/utils/tryBackgroundUrls.ts')
| -rw-r--r-- | webAO/utils/tryBackgroundUrls.ts | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/webAO/utils/tryBackgroundUrls.ts b/webAO/utils/tryBackgroundUrls.ts deleted file mode 100644 index 154978b..0000000 --- a/webAO/utils/tryBackgroundUrls.ts +++ /dev/null @@ -1,15 +0,0 @@ -import fileExists from "./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]; - const fullFileUrl = url + extension; - const exists = await fileExists(fullFileUrl); - if (exists) { - return fullFileUrl; - } - } - return transparentPng; -}; -export default tryBackgroundUrls; |
