t u t o r i a l s i t e
home tutorial twitter facebook official +follow
disclamiar
annyeong guise
Yad {16} Malaysian. This my tuto site. Contact me, I'm friendly.

chat
leave footsteps

credit
thanks for everything
©nurin
thank you people

« newer post
older post »
Tutorial: Disable Right Click
Friday, June 10, 2011 - 0 comment

Assalamualaikum.

Hari ini yad akan tunjuk dua cara untuk disable right click. Basically, disable right click ini khas untuk mengelakkan para copycat daripada menekan right click dan buka source page, page info atau copy content blog anda.

Lets start.

Disable Right Click only

1 - Dashboard > design > add gadget > HTMLjavascript

2 - Paste code dibawah
<script language=JavaScript>
<!--
//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dauspozi.com
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>
3 - Save & Done


Disable right click with pop-out window.

1 - Dashboard - design - Add gadget - HTMLjavascript

2 - Copy and paste je code ni:-
<script language="javascript"><!--
//Disable right mouse click Script//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive//For full source code, visit http://www.dynamicdrive.com
var message="TULIS RANDOM";
///////////////////////////////////function clickIE4(){if (event.button==2){alert(message);return false;}}
function clickNS4(e){if (document.layers||document.getElementById&&!document.all){if (e.which==2||e.which==3){alert(message);return false;}}}
if (document.layers){document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS4;}else if (document.all&&!document.getElementById){document.onmousedown=clickIE4;}
document.oncontextmenu=new Function("alert(message);return false")
// --></script>
Pink; Gantikan dengan apa yang anda nak.

3 - Save & Done

Goodluck. 

Labels: