Made image loading more reliable
This commit is contained in:
parent
4976e5ab35
commit
2894a92af1
@ -908,6 +908,13 @@ export default class AnimeNotifier {
|
||||
}
|
||||
|
||||
element.onerror = () => {
|
||||
// Try loading from the origin server if our CDN failed
|
||||
if(element.src.includes("media.notify.moe/")) {
|
||||
console.warn(`CDN failed loading ${element.src}`)
|
||||
element.src = element.src.replace("media.notify.moe/", "notify.moe/")
|
||||
return
|
||||
}
|
||||
|
||||
if(element.classList.contains("element-found")) {
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user