Skip to content

Instantly share code, notes, and snippets.

@2tunnels
Created August 5, 2015 21:32
Show Gist options
  • Save 2tunnels/3dd9b42cef86819aaf4c to your computer and use it in GitHub Desktop.
Save 2tunnels/3dd9b42cef86819aaf4c to your computer and use it in GitHub Desktop.
Google URLs
var links = document.querySelectorAll('.srg .g h3 a'); var urls = []; [].forEach.call(links, function(link) { urls.push(link.href.indexOf('google') === -1 ? link.href : link.getAttribute('data-href')) }); prompt('URL', urls.join('\n'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment