Skip to content

Instantly share code, notes, and snippets.

@8bitDesigner
Last active December 19, 2015 05:19
Show Gist options
  • Save 8bitDesigner/5903340 to your computer and use it in GitHub Desktop.
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
// 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