I am eager to put this answer given to another question into practice:
https://stackoverflow.com/a/20505898/2174961
However, I am not very familiar with JavaScript and I don't know how to complete the code that goes in the body. How do I include the location of the image to be shown when the condition is true?
<script>
if( window.canRunAds === undefined ){
// adblocker detected, show fallback
showFallbackImage();
}
</script>