Created
December 30, 2022 18:28
-
-
Save nathangathright/683e44f4de91997917b019754a9bf8fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="http://SUBDOMAIN.DOMAIN.COM/hash/283379236/128" data-fallback="/feed/b9cd9278-2679-5cfd-9bc7-7f1e04f1cba4/item/f8e00bc8-9f47-11ec-adea-33b8a6094f44/128"> | |
<script> | |
let podcastimages = document.querySelectorAll('[data-fallback]'); | |
podcastimages.forEach(image => { | |
image.addEventListener("error", (event) => { | |
image.src!=image.dataset.fallback ? image.src=image.dataset.fallback : false; | |
}) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment