Skip to content

Instantly share code, notes, and snippets.

@kumekay

kumekay/domains.js

Created Oct 1, 2017
Embed
What would you like to do?
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