Created
February 10, 2016 14:00
-
-
Save innermond/e0d3cf049ce0f2911ae7 to your computer and use it in GitHub Desktop.
Bookmark get images href
This file contains hidden or 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
| javascript:void(function() { | |
| document.title = "List images"; | |
| var links = document.querySelectorAll('div[data-ved]>a'); | |
| var link = ""; | |
| var href = ""; | |
| var found = []; | |
| for(var inx = 0, len = links.length; inx < len; inx++) { | |
| link = links[inx]; | |
| if ( ! href in link) continue; | |
| href = link.href; | |
| found.push(href.match(/\?imgurl=([^&]+)/).pop()); | |
| } | |
| var d = window.open(""); | |
| d.document.open(); | |
| d.title = "Images urls"; | |
| d.document.write(found.join("<br>")); | |
| d.document.close(); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment