Skip to content

Instantly share code, notes, and snippets.

@qmdnls

qmdnls/debug.md

Created Jun 9, 2019
Embed
What would you like to do?
Give each element on the page a randomly coloured outline

"One-line debugger" to give each element on the page a randomly coloured outline

[].forEach.call(document.querySelectorAll("*"),function(a){a.style.outline="1px solid #"+(~~(Math.random()*(1<<24))).toString(16)})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment