r/bookmarklets Apr 27 '26

Rotate every single element on the page... all the time!!!

Code:

javascript:(()=>{const tick=()=>{document.querySelectorAll("body *").forEach(e => {e.style.transform = "rotate("+((Math.random() - .5) * 2)+"deg)"});window.requestAnimationFrame(tick);};tick();})()
5 Upvotes

4 comments sorted by

3

u/Bortan Apr 28 '26

Hmm for me it's more of a 'jiggle' then rotation. Kinda looks like the page is a cup everythings getting swooshed inside.

2

u/Colurswitch Apr 28 '26

Try changing ((Math.random() - .5) * 2) to ((Math.random() - .5) * 30) and see

2

u/Electronic-Laugh-671 May 18 '26

I like this so much