Last active
December 25, 2015 03:39
-
-
Save firelizzard18/6911838 to your computer and use it in GitHub Desktop.
minclicky
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Click the URL bar, type 'javascript:', then paste this