Skip to content

Instantly share code, notes, and snippets.

@oobleck
Last active August 29, 2015 14:12
Show Gist options
  • Save oobleck/32c62974618590726273 to your computer and use it in GitHub Desktop.
Save oobleck/32c62974618590726273 to your computer and use it in GitHub Desktop.
Tiny pesticide clone from Addy Osmani and friends. It outlines every unique tag type in a color for DOM visualization.
// Gathered & compiled from https://gist.github.com/addyosmani/fd3999ea7fce242756b1
for(i=0;A=$$("html /deep/ *")[i++];)A.style.outline="solid hsl("+parseInt(A.tagName,36)+",99%,50%)1px"
// Or the no color onion layer version
for(i=0;A=$$("*")[i++];)A.style.backgroundColor="rgba(0,0,0,0.01)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment