Skip to content

Instantly share code, notes, and snippets.

@vortexau
Forked from tomnomnom/google-copy.js
Created June 19, 2019 21:31
Show Gist options
  • Save vortexau/3e38bdf574cf1622c94d1f9afd569d58 to your computer and use it in GitHub Desktop.
Save vortexau/3e38bdf574cf1622c94d1f9afd569d58 to your computer and use it in GitHub Desktop.
Bookmarklet to copy URLs from a Google search results page
javascript:d=document;b=d.createElement`textarea`;c=d.getSelection();b.textContent=[...d.querySelectorAll`div.r>a:first-child`].map(n=>n.href).join`\n`;d.body.appendChild(b);c.removeAllRanges();b.select();d.execCommand`copy`;d.body.removeChild(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment