Created
April 24, 2017 17:04
-
-
Save benscabbia/ac91d8f9722a48295fc350cab740cc8c to your computer and use it in GitHub Desktop.
x-ray is a visual debugger for your HTML, executable via a bookmark!
This file contains hidden or 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
javascript: ( | |
function () { | |
var elements = document.body.getElementsByTagName("*"); | |
var items = []; | |
for (var i = 0; i < elements.length; i++) { | |
if (elements[i].innerHTML.indexOf("background:#000!important;color:#0f0!important;outline:solid #f00 1px!important;") != -1) { | |
items.push(elements[i]); | |
} | |
} | |
if (items.length > 0) { | |
for (var i = 0; i < items.length; i++) { | |
items[i].innerHTML = ""; | |
} | |
} else { | |
document.body.innerHTML += "<style>*{background:#000!important;color:#0f0!important;outline:solid #f00 1px!important;}</style>"; | |
} | |
} | |
)(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment