Skip to content

Instantly share code, notes, and snippets.

@kumekay
Created October 1, 2017 15:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kumekay/d6b5ee33c0129595352f0b0de2abf00c to your computer and use it in GitHub Desktop.
Save kumekay/d6b5ee33c0129595352f0b0de2abf00c to your computer and use it in GitHub Desktop.
Extract all domains through browser console
let links = document.querySelectorAll( "a" );
let hosts = []
links.forEach ( (l) => { hosts.push(l.host.replace("www.", ""))})
const domains = new Set(hosts)
domains.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment