Skip to content

Instantly share code, notes, and snippets.

@adamesque
Created February 3, 2010 00:42
Show Gist options
  • Save adamesque/293210 to your computer and use it in GitHub Desktop.
Save adamesque/293210 to your computer and use it in GitHub Desktop.
(function () {
var selector = window.prompt("Enter a selector to highlight", "a, .gl, a span"),
els = document.querySelectorAll(selector),
el;
for each (el in els) {
if (el.style) el.style.backgroundColor = "rgba(255,0,0,0.5)";
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment