Last active
December 19, 2015 05:19
-
-
Save 8bitDesigner/5903340 to your computer and use it in GitHub Desktop.
Find and log every DOMNode on the page which isn't using Proxima Nova as its font-family
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
// Find and log every DOMNode on the page which isn't using Proxima Nova | |
// as its font-family | |
function isHeretic(node) { return (window.getComputedStyle(node).fontFamily.indexOf('proxima-nova') < 0) } | |
function isVisible(node) { return (window.getComputedStyle(node).display !== 'none') } | |
function log(node) { console.log(node, window.getComputedStyle(node).fontFamily) } | |
function toArray(domlist) { return Array.prototype.slice.call(domlist) } | |
toArray(document.querySelectorAll('#fs-main-content *')).filter(isHeretic).filter(isVisible).forEach(log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment