Skip to content

Instantly share code, notes, and snippets.

@justadityaraj
Forked from vcastroi/css-layout-hack.js
Last active August 1, 2022 11:18
Show Gist options
  • Save justadityaraj/b78b24b8b2940d2e4dbbb91e8cb112b1 to your computer and use it in GitHub Desktop.
Save justadityaraj/b78b24b8b2940d2e4dbbb91e8cb112b1 to your computer and use it in GitHub Desktop.
#Minified - Create a bookmark and paste this code as a URL to toggle the CSS on/off.
javascript:!function(){for(var c=document.body.getElementsByTagName("*"),b=[],a=0;a<c.length;a++)-1!=c[a].innerHTML.indexOf("* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; background-color: rgba(255,0,0,.2) !important; }")&&b.push(c[a]);if(b.length>0)for(var a=0;a<b.length;a++)b[a].innerHTML="";else document.body.innerHTML+="<style>* { background:#000!important;color:#0f0!important;outline:solid #f00 1px!important; 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; } * * * * * * * { background-color: rgba(255,0,0,.2) !important; } * * * * * * * * { background-color: rgba(0,255,0,.2) !important; } * * * * * * * * * { background-color: rgba(0,0,255,.2) !important; }</style>"}()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment