mirror of
https://github.com/Daniongithub/ER-TPL.git
synced 2025-10-02 14:10:49 +00:00
Test failover immagini seta urb
This commit is contained in:
8
scripts/images.js
Normal file
8
scripts/images.js
Normal file
@@ -0,0 +1,8 @@
|
||||
document.querySelectorAll('img').forEach(img => {
|
||||
img.addEventListener('error', function () {
|
||||
const fallback = this.getAttribute('data-fallback');
|
||||
if (fallback && this.src !== fallback) {
|
||||
this.src = fallback;
|
||||
}
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user