The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Disable Right-Click in threads!
I would like to see a hack to disable right-clicking,but only in posts. I found a hack for phpbb that does it which i will give the code now...
Code:
<!-- Start add - No copy MOD --> <script language="javascript"> <!-- var previous_key ; function clickIE4(){ if (event.button==2){ alert('No Right Click Is Allowed'); return false; } } function clickNS4(e){ if (document.layers||document.getElementById&&!document.all){ if (e.which==2||e.which==3){ alert('No Right Click Is Allowed'); return false; } } } if (document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } function handleKeyDown() { if (previous_key==17 ) { switch (window.event.keyCode) { case 45 : case 46: case 67: case 88: alert('Copy Is Not Allowed'); event.keyCode=0; previous_key=window.event.keyCode; event.returnValue=false; break; } } else if (previous_key==16) { switch (window.event.keyCode) { case 45 : case 46: alert('Copy Is Not Allowed'+window.event.keyCode); event.keyCode=0; previous_key=window.event.keyCode; event.returnValue=false; break; } } previous_key=window.event.keyCode; } function handleKeyUp() { previous_key=0; } if ( 1 ) { document.oncontextmenu=new Function("alert('No Right Click Is Allowed');return false") document.onkeyup = handleKeyUp; document.onkeydown = handleKeyDown; } //--> </script> <!-- End add - No copy MOD --> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|