Skip to content

Instantly share code, notes, and snippets.

@nasser
Created January 20, 2016 06:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nasser/308a2ab29bad354554bd to your computer and use it in GitHub Desktop.
Save nasser/308a2ab29bad354554bd to your computer and use it in GitHub Desktop.
Draggable Google Image Results
var imgs = document.querySelectorAll("div.rg_di.rg_el.ivg-i img")
for(var i=0; i<imgs.length;i++) {
imgs[i].src = imgs[i].parentNode.href.match(/\?imgurl=([^&]+)&/)[1];
imgs[i].parentNode.removeAttribute("href");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment