Behold the wraith of my JS hacks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var elems = document.getElementsByTagName('*'); | |
var usages = {}; | |
for (var i = 0; i < elems.length; i++) { | |
var elemStyles = document.defaultView.getComputedStyle(elems[i], null); | |
var font = elemStyles.getPropertyValue('font-family').split(',')[0]; | |
var weight = elemStyles.getPropertyValue('font-weight'); | |
var style = elemStyles.getPropertyValue('font-style'); | |
var fontName = `${font} ${weight} ${style}`; |