-
-
Save framp/11190fdd48f994f3c748 to your computer and use it in GitHub Desktop.
var fonts = Array.prototype.slice.call(document.querySelectorAll('.font')); | |
var state = ['none', 'block']; | |
var condition = function(i, skip){ | |
return i.childNodes[0].className.indexOf(skip)===-1; | |
} | |
var filter = function(skip, i){ | |
i.style.display = state[condition(i, skip)>>0]; | |
}; | |
fonts.forEach(filter.bind(null, 'Typekit')); |
Google only list:
SANS SERIF
Abel
Alegreya Sans
Asap
Cabin
Dosis
Droid Sans
Exo 2
Josefin Sans
Lato
Montserrat
Open Sans
Oswald
PT Sans
Raleway
Roboto
Roboto Condensed
Source Sans Pro
Titillium Web
Ubuntu
Varela Round
SERIF
Alegreya SC
Alice
Crimson Text
Droid Serif
IM Fell English
Libre Baskerville
Lora
Merriweather
Noto Serif
Old Standard TT
PT Serif
Sorts Mill Goudy
Volkhov
SLAB SERIF
Arbutus Slab
Arvo
Bitter
Glegoo
Josefin Slab
Roboto Slab
Sanchez
DISPLAY
Alfa Slab One
Amatic SC
Black Ops One
Cinzel Decorative
Flamenco
Graduate
Gruppo
Julius Sans One
Lancelot
Nixie One
Permanent Marker
Playfair Display
Playfair Display SC
Rye
Spirax
Ultra
Vast Shadow
SCRIPT
Lily Script One
Lobster Two
Oleo Script
Playball
Sail
MONO
Droid Sans Mono
Inconsolata
PT Mono
Source Code Pro
Ubuntu Mono
Or if you're into one-liners:
Array.prototype.slice.call(document.querySelectorAll('.font')).forEach(function(i){ i.style.display = i.childNodes[0].className.indexOf('Typekit')===-1 ? 'block' : 'none'; })