Skip to content

Instantly share code, notes, and snippets.

View gridwalk's full-sized avatar

Don Hanson gridwalk

View GitHub Profile
@gridwalk
gridwalk / css_scrambler.js
Created December 23, 2015 22:07
CSS Scrambler is a bookmarklet that reads the HTML from top to bottom and shifts the CSS rules from each element onto its preceding element. The result is a scrambled layout. It can be run multiple times on a page!
// the css rules that we want to copy
var all_styles = ["background","backgroundAttachment","backgroundColor","backgroundImage","backgroundPosition","backgroundRepeat","border","borderBottom","borderBottomColor","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderLeft","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRight","borderRightColor","borderRightStyle","borderRightWidth","borderSpacing","borderStyle","borderTop","borderTopColor","borderTopStyle","borderTopWidth","borderWidth","borderImage","borderRadius","bottom","boxShadow","captionSide","clear","clip","color","content","cssFloat","cursor","direction","display","fill","font","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","height","left","letterSpacing","lineHeight","listStyle","listStyleImage","listStylePosition","listStyleType","margin","marginBottom","marginLeft","marginRight","marginTop","maxHeight","maxWidth","minHeight","minWidth","opacity","outline","outlineC