diff options
| author | stonedDiscord <Tukz@gmx.de> | 2022-03-18 21:04:09 +0100 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2022-03-18 21:04:09 +0100 |
| commit | 4a10c280d2112003ce1ce8c9041190290a858c08 (patch) | |
| tree | 6a27bc7217c96dbaf0a8595d9ccdf574359a3aea /webAO/client.js | |
| parent | 7700da3b537697e58e41e50ca7e724986099b66b (diff) | |
| parent | ef69cb63da031129db046d9b5f1f5b9feb57ee34 (diff) | |
Merge branch 'master' into coolloading
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webAO/client.js b/webAO/client.js index c61cf45..553f1cf 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -28,6 +28,7 @@ import fileExists from './utils/fileExists.js'; import queryParser from './utils/queryParser.js'; import getAnimLength from './utils/getAnimLength.js'; import getResources from './utils/getResources.js'; +import transparentPng from './constants/transparentPng'; const version = process.env.npm_package_version; @@ -44,7 +45,6 @@ const THEME = theme || 'default'; const UPDATE_INTERVAL = 60; -const transparentPNG = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='; /** * Toggles AO1-style loading using paginated music packets for mobile platforms. * The old loading uses more smaller packets instead of a single big one, @@ -799,7 +799,7 @@ class Client extends EventEmitter { } } }; - await getCharIcon(); + getCharIcon(); // If the ini doesn't exist on the server this will throw an error try { @@ -2100,7 +2100,8 @@ class Viewport { const baseEffectUrl = `${AO_HOST}themes/default/effects/`; fg.src = `${baseEffectUrl}${encodeURI(this.chatmsg.effects[0].toLowerCase())}.webp`; } else { - fg.src = transparentPNG; + + fg.src = transparentPng; } const soundChecks = ['0', '1', '', undefined]; @@ -2616,7 +2617,7 @@ window.changeCharacter = changeCharacter; */ export function charError(image) { console.warn(`${image.src} is missing from webAO`); - image.src = transparentPNG; + image.src = transparentPng; return true; } window.charError = charError; @@ -3141,3 +3142,4 @@ export function toggleShout(shout) { } } window.toggleShout = toggleShout; +export default Client |
