Skip to content

Instantly share code, notes, and snippets.

@anmarco
Created February 10, 2019 02:20
Show Gist options
  • Save anmarco/468ef0b0851b781b161457e19adb76bc to your computer and use it in GitHub Desktop.
Save anmarco/468ef0b0851b781b161457e19adb76bc to your computer and use it in GitHub Desktop.
change images to nicolas cage photo
var nr = 0;
function cage() {
var resources = performance.getEntriesByType("resource");
if (resources.length > nr){
nr = resources.length
var imgs = document.getElementsByTagName('img')
Array.from(imgs).forEach((e)=>{e.setAttribute('src', 'https://i.imgur.com/a4CBVXS.png')})
return
}
return
}
setInterval(cage, 1000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment