Skip to content

Instantly share code, notes, and snippets.

@sirdarckcat
Created May 24, 2017 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sirdarckcat/bdc3d73c04413e0026b9de827d9af486 to your computer and use it in GitHub Desktop.
Save sirdarckcat/bdc3d73c04413e0026b9de827d9af486 to your computer and use it in GitHub Desktop.
Make random screen click pretty
<script>
window.oncontextmenu=window.onauxclick=window.onclick=function(e){
with(document.body.appendChild(document.createElement('div'))){
style.left=e.clientX+'px';
style.top=e.clientY+'px';
style.position='absolute';
style.height='0';
style.width='0';
style.opacity='0.1';
style.boxShadow='0 0 0 '+(Math.random()*800+5)+'px #'+Math.floor(Math.random()*0xFFFFFF).toString(16);
}
document.documentElement.style.zoom=Math.random()*5;
e.preventDefault();
e.stopPropagation();
return false;
}
</script>
@masatokinugawa
Copy link

AAA

@masatokinugawa
Copy link

zzz

@masatokinugawa
Copy link

aaa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment