Skip to content

Instantly share code, notes, and snippets.

@milancermak
Created December 3, 2012 16:32
Show Gist options
  • Save milancermak/4196125 to your computer and use it in GitHub Desktop.
Save milancermak/4196125 to your computer and use it in GitHub Desktop.
killpaste bookmarklet
javascript:(function(){var%20H=["cut","copy","paste","contextmenu","mousedown"],%20Z=[],%20s="",%20j;%20function%20R(N,a){%20while%20(N[a])%20{%20Z[a]=Z[a]?Z[a]+1:1;%20N[a]=null;%20}%20}%20function%20zapEH(N)%20{%20var%20a,i,C;%20for%20(j%20in%20H)%20R(N,"on"+H[j]);%20C=N.childNodes;%20for%20(i=0;i<C.length;++i)%20zapEH(C[i]);%20}%20zapEH(document);%20for%20(j%20in%20Z)%20s%20+=%20j%20+%20"%20("%20+%20Z[j]%20+%20")\n";%20if(s)%20alert("Zapped%20event%20handlers:\n\n"+s);%20else%20alert("No%20event%20handlers%20found.");})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment