Skip to content

Instantly share code, notes, and snippets.

@firelizzard18
Last active December 25, 2015 03:39
Show Gist options
  • Save firelizzard18/6911838 to your computer and use it in GitHub Desktop.
Save firelizzard18/6911838 to your computer and use it in GitHub Desktop.
minclicky
function start(){var e=document.createElement("div");e.style.position="absolute";e.style.top="150px";e.style.left="50px";e.style["z-index"]=10;e.style.width="20px";e.style.height="20px";e.style["background-color"]="red";e.innerHTML="AC";e.onclick=toggle;document.body.appendChild(e);window.acint=setInterval(doClick,1);window.acel=e}function toggle(){window.ac=!window.ac;if(window.ac)window.acel.style["background-color"]="darkgreen";else window.acel.style["background-color"]="red"}function doClick(){if(window.ac)fireClick(bigCookie,100,100)}function fireClick(e,t,n){var r=e;var i={x:0,y:0};while(r!=null){i.x+=e.offsetLeft;i.y+=e.offsetTop;r=r.offsetParent}var s=document.createEvent("MouseEvents");s.initMouseEvent("click",true,true,window,1,i.x+t,i.y+n,t,t,false,false,false,false,0,null);if(e.fireEvent){e.fireEvent("on"+etype)}else{var s=document.createEvent("Events");s.initEvent("click",true,false);e.dispatchEvent(s)}}start()
@firelizzard18
Copy link
Author

Click the URL bar, type 'javascript:', then paste this

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