[Solved] Removing Image after some days? [closed]


To remove any (1 or more) IMG tags of given URL:

<img src="http://quackit.com/pix/milford_sound/milford_sound_t.jpg"; 
    style="max-width:100%" alt="Milford Sound in New Zealand" />

from a page by JavaScript append the following code:

<script type="text/javascript">
function removeThatImg() {
    var ex=document.getElementsByTagName("img");
    for (var i=0;i<ex.length;i++) {
        if ( ex[i].src == "http://quackit.com/pix/milford_sound/milford_sound_t.jpg" )
            ex[i].parentNode.removeChild(ex[i]);
    }
}
var dateStart = Date.parse('March 16, 2013')/86400000;
var dateNow = new Date();
dateNow = dateNow.getTime()/86400000;
if ( dateNow - dateStart > 5) // more than 5 days 
    window.onload=function() {
        //do it with a half second delay, because google may take time to add that image
        //and right after the page is loaded it may not yet be there
        setTimeout(removeThatImg,500);
    }
</script>

it just MAY work (or may not – which i think will be the case, simply, because the image will be different everytime)

7

solved Removing Image after some days? [closed]