Skip to content

Instantly share code, notes, and snippets.

View robenr's full-sized avatar
🏠
Working from home

Roben Rajan robenr

🏠
Working from home
View GitHub Profile
@robenr
robenr / background.js
Last active September 7, 2015 12:01 — forked from ddrscott/background.js
Color background of all elements on a page via bookmarklet
// @see http://www.quora.com/Web-Development/What-are-the-most-interesting-HTML-JS-DOM-CSS-hacks-that-most-web-developers-dont-know-about
// @see http://qr.ae/Khvbr
var s=document.createElement('style');
s.textContent = "<style> * { background-color: rgba(255,0,0,.2) !important} * * { background-color: rgba(0,255,0,.2) !important} * * * { background-color: rgba(0,0,255,.2) !important} * * * * { background-color: rgba(255,0,255,.2) !important} * * * * * { background-color: rgba(0,255,255,.2) !important} * * * * * * { background-color: rgba(255,255,0,.2) !important}</style>";
document.getElementsByTagName('head')[0].appendChild(s);