aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorstonedDiscord <stoned@derpymail.org>2019-07-18 21:40:45 +0200
committerstonedDiscord <stoned@derpymail.org>2019-07-18 21:40:45 +0200
commita9d9360faac5cce611acab620a1e4368028f5c01 (patch)
tree0246a31589a28573ba40286c73a1a3f3dd5e17de /webAO/client.js
parent5f8a02f59022a9c82eac035a0cfa148b19adc1ce (diff)
only show missingno for characters and not testimony/evidence
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 8a5ddfb..f417c5b 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1414,7 +1414,7 @@ window.changeCharacter = changeCharacter;
* Triggered when there was an error loading a character sprite.
* @param {HTMLImageElement} image the element containing the missing image
*/
-export function imgError(image) {
+export function charError(image) {
image.onerror = "";
image.src = "misc/placeholder.gif";
return true;
@@ -1422,6 +1422,17 @@ export function imgError(image) {
window.imgError = imgError;
/**
+ * Triggered when there was an error loading a generic sprite.
+ * @param {HTMLImageElement} image the element containing the missing image
+ */
+export function imgError(image) {
+ image.onerror = "";
+ image.src = ""; //unload so the old sprite doesn't persist
+ return true;
+}
+window.imgError = imgError;
+
+/**
* Triggered when there was an error loading a character icon.
* @param {HTMLImageElement} image the element containing the missing image
*/