Skip to content

Instantly share code, notes, and snippets.

@gnchrv
Last active November 23, 2019 22:19
Show Gist options
  • Save gnchrv/71624f57759b3d81a028de813c6b0180 to your computer and use it in GitHub Desktop.
Save gnchrv/71624f57759b3d81a028de813c6b0180 to your computer and use it in GitHub Desktop.
List all Wikipedia language-specific subdomains
// Run this bookmarlet on the page containing a list of active Wikipedias → https://en.wikipedia.org/wiki/List_of_Wikipedias
[...document.querySelectorAll('table')[1]
.querySelectorAll('tr')
].filter(tr => !tr.innerText.includes('(closed)'))
.map(tr => tr.querySelector('a.extiw'))
.filter(a => a)
.filter(a => !a.title.includes('Special') && !a.title.includes('Stat'))
.map(a => a.title.replace(/:.*/, ''))
.join()
// And also add 'en' which is considered default and not listed on the page
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment