Wednesday, December 12

Disable Right-Click w/o Alert


A rose with a cup of tea

Haii, kali ini disable right-click tanpa alert/amaran waspada korang tu.

1. Copy code bawah ini ;

<script language=javascript>

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")


</script>

2. Paste di Dashboard > Layout > Add a Page Element > HTML/Javascript
3. Save and DONE.

No comments: