Skip to content

Instantly share code, notes, and snippets.

@innermond
Last active July 9, 2016 12:49
Show Gist options
  • Select an option

  • Save innermond/3aa15512aedb78c4c9ffc588465da905 to your computer and use it in GitHub Desktop.

Select an option

Save innermond/3aa15512aedb78c4c9ffc588465da905 to your computer and use it in GitHub Desktop.
Get a list of fontnames from google fonts. You need to paste it in console si run it, the run again and again till you exhaust the list
console.clear();
// https://fonts.google.com/?subset=latin-ext&category=Sans+Serif ; get list from here
// run it from the console; when run for first time uncomment the line below and comment the subsequent line; for the next runs just use the script as is here
// var latin = [];
var latin = latin || [];
var nodes = document.querySelectorAll('h1.fonts-module-title');
Array.prototype.forEach.call(nodes, function(nod){
var font = nod.textContent.trim("\n");
if (latin.indexOf(font) == -1) latin.push(font);
});
nodes.item(nodes.length - 1).scrollIntoView();
latin.join("\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment