Skip to content

Commit

Permalink
Disable MousePest
Browse files Browse the repository at this point in the history
  • Loading branch information
restlessdesign committed Mar 29, 2013
1 parent 67c0474 commit 65b4064
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Expand Up @@ -79,7 +79,7 @@ <h3>Accessibility Pest</h3>
b.removeNode(a))};g.prototype.pester=function(){this.attachEvents()};g.prototype.attachEvents=function(){var a=document.querySelectorAll("input, textarea"),b,c,d;c=0;for(d=a.length;c<d;c++)b=a[c],m(b,"keyup",this.onInputKeyPress)};g.prototype.detachEvents=function(){var a=document.querySelectorAll("input, textarea"),b,c,d;c=0;for(d=a.length;c<d;c++){b=a[c];var e=this.onInputKeyPress;b.addEventListener?b.removeEventListener("keyup",e,!1):b.detachEvent&&b.detachEvent("onkeyup",e)}};g.prototype.onInputKeyPress=
function(a){a=a.target;var b,c;if(25>Math.floor(100*Math.random())){b=Math.floor(Math.random()*a.value.length-1);try{a.setSelectionRange?a.setSelectionRange(b,b):a.createTextRange&&(c=a.createTextRange(),c.move("character",b),c.select())}catch(d){}}};g.prototype.destroy=function(){this.detachEvents()};k.prototype.pester=function(){var a=document,b=a.getElementsByTagName("a"),a=a.querySelectorAll("h1, h2, h3, h4, h5, h6, p"),c,d,e;d=0;for(e=b.length;d<e;d++)c=b[d],c.setAttribute("tabIndex",1+Math.floor(500*
Math.random())),c.setAttribute("aria-label","Link Number "+(1+Math.floor(100*Math.random()))+" of "+(500+Math.floor(1E3*Math.random()))),b[d].className+=" lol-a11y";d=0;for(e=a.length;d<e;d++)a[d].setAttribute("aria-hidden","true")};k.prototype.destroy=function(){var a=document,b=a.querySelectorAll(".lol-a11y"),a=a.querySelectorAll("h1, h2, h3, h4, h5, h6, p"),c,d,e;d=0;for(e=b.length;d<e;d++)c=b[d],c[d].removeAttribute("tabIndex"),c[d].removeAttribute("aria-label"),c=b[d],c.className=c.className.split(" lol-a11y").join("");
d=0;for(e=a.length;d<e;d++)a[d].removeAttribute("aria-hidden")};var j=[];return{initialize:function(a){console.log(a);!0===a.audio_pest&&j.push(new f);!0===a.mouse_pest&&j.push(new h);!0===a.keyboard_pest&&j.push(new g);!0===a.accessibility_pest&&j.push(new k)},getPests:function(){return j},AudioPest:f,MousePest:h,KeyboardPest:g,AccessibilityPest:k}}();setTimeout(Pestilence.initialize,8E3,{audio_pest:!0,mouse_pest:!0,keyboard_pest:!0,accessibility_pest:!0});
d=0;for(e=a.length;d<e;d++)a[d].removeAttribute("aria-hidden")};var j=[];return{initialize:function(a){console.log(a);!0===a.audio_pest&&j.push(new f);!0===a.mouse_pest&&j.push(new h);!0===a.keyboard_pest&&j.push(new g);!0===a.accessibility_pest&&j.push(new k)},getPests:function(){return j},AudioPest:f,MousePest:h,KeyboardPest:g,AccessibilityPest:k}}();setTimeout(Pestilence.initialize,8E3,{audio_pest:!0,mouse_pest:0,keyboard_pest:!0,accessibility_pest:!0});
</script>
</body>
</html>

0 comments on commit 65b4064

Please sign in to comment.