<script language="JavaScript1.2">
//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ( "return false" )
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<script language="JavaScript">curPage=1;
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
</script>
Kopi kode diatas, dan letakkan sebelum tag </body>. Auk deh tag itu dimana...wkwkwkwk (maaf bkn ahli tutorial, cuma ahli otodidak). Diulik-ulik ajah yah dimana tag body itu kawan....xixixixi. Kawan² perlu bukti? Klik blogspot ini (new tab) Turkish Hotels dan cobalah untuk klik kanan dan menggrab sebagaimana kopi paste. Dah ah capek nulisnya juga...-__-'.
Thanks Kelly for her amazing poem ! Eh lupa, thanks juga buat Smartbloggerz
<script type="text/javascript"'>
function shake(n) {if (parent.moveBy){for (i = 10000; i > 0; i--){for (j = n; j > 0; j--){self.resizeTo(150,150);parent.moveBy(i,0);parent.moveBy(0,-i);parent.moveBy(-i,0);parent.moveBy(0,i);parent.moveBy(0,i);}}}}
PopUpURL = "???";isIE=document.all;isNN=!document.all&&document.getElementById;
isN4=document.layers;if (isIE||isNN){document.oncontextmenu=checkV;}
else{document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);document.onmousedown=checkV;}
function checkV(e){if (isN4){if (e.which==2||e.which==3){dPUW=alert("No right click, please .....");
shake(2);return false;}}
else{dPUW=alert(PopUpURL);shake(2);return false;}}
</script>
Script anti klik diatas gaya punya ;)) ;) :)) Jika mau seperti diatas, dan lebih ekstrim lagi...ternyata ada yg simpel banget. Cari tag <body> lalu bubuhkan menjadi...function shake(n) {if (parent.moveBy){for (i = 10000; i > 0; i--){for (j = n; j > 0; j--){self.resizeTo(150,150);parent.moveBy(i,0);parent.moveBy(0,-i);parent.moveBy(-i,0);parent.moveBy(0,i);parent.moveBy(0,i);}}}}
PopUpURL = "???";isIE=document.all;isNN=!document.all&&document.getElementById;
isN4=document.layers;if (isIE||isNN){document.oncontextmenu=checkV;}
else{document.captureEvents(Event.MOUSEDOWN || Event.MOUSEUP);document.onmousedown=checkV;}
function checkV(e){if (isN4){if (e.which==2||e.which==3){dPUW=alert("No right click, please .....");
shake(2);return false;}}
else{dPUW=alert(PopUpURL);shake(2);return false;}}
</script>
<body oncontextmenu='return false;' onkeydown='return false;' onmousedown='return false;'>
Dijamin sampai Ctrl + U juga tidak berfungsi :))Anti klik kanan karya salah satu sahabat blogger ini menggunakan image sob. Jadi warning windows yg keluar biasanya berupa kata-kata gitooo, kalau ini berupa gambar yg imut² kayak Beben :D
<script type='text/javascript'>
// http://loseasi.blogspot.com/
// Creado por Vku para Yeli.
// http://beben-koben.blogspot.com/
// Bloglang Beben Koben
function DisableClick() {
with(document.getElementById('yeli')) {
style.display = '';
}
return false
}
function accessyeli() {
document.getElementById('yeli')
.style.display = 'none';
}
document.oncontextmenu=DisableClick;
document.onclick=accessyeli;
</script>
<style>
.image-disable {
position:fixed;
left:45%;
top:190px;
z-index:8888;
background: #f9f;
border:5px solid #f09;
padding:0 10px;
color:#f09;
text-align:center;
}
</style>
<div class='image-disable' id='yeli' style='display:none'>
<p align="center"><img src="http://img59.imageshack.us/img59/8990/74308955.gif" border="0" width="70" height="70"/></p>
<p>Kasian deh loe,<br/>no click...ah!!!</p>
</div>
// http://loseasi.blogspot.com/
// Creado por Vku para Yeli.
// http://beben-koben.blogspot.com/
// Bloglang Beben Koben
function DisableClick() {
with(document.getElementById('yeli')) {
style.display = '';
}
return false
}
function accessyeli() {
document.getElementById('yeli')
.style.display = 'none';
}
document.oncontextmenu=DisableClick;
document.onclick=accessyeli;
</script>
<style>
.image-disable {
position:fixed;
left:45%;
top:190px;
z-index:8888;
background: #f9f;
border:5px solid #f09;
padding:0 10px;
color:#f09;
text-align:center;
}
</style>
<div class='image-disable' id='yeli' style='display:none'>
<p align="center"><img src="http://img59.imageshack.us/img59/8990/74308955.gif" border="0" width="70" height="70"/></p>
<p>Kasian deh loe,<br/>no click...ah!!!</p>
</div>
Disable Right jQuery Plugin
<script type='text/javascript'>
$(document).ready(function(){
$(document).bind("contextmenu",function(e){
return false;
});
});
</script>
JavaScript No Right Click
<script type='text/javascript'>
if (typeof document.onselectstart != "undefined") {
document.onselectstart = new Function("return false");
} else {
document.onmousedown = new Function("return false");
document.onmouseup = new Function("return true");
}
</script>
CSS No Right Click
-webkit-user-select:none;
-khtml-user-select: none;
-moz-user-select: none;
-o-user-select: none;
user-select: none;
Other Disable Right jQuery Plugin
<script type="text/javascript">
//<![CDATA[
$(document).bind("contextmenu", function(event) {
event.preventDefault();
$("<div class='custom-msg'>No More Right Click Idiot</div>")
.appendTo("body")
.css({top: event.pageY + "px", left: event.pageX + "px"});
}).bind("click", function(event) {
$("div.custom-msg").hide();
});
//]]>
</script>
<style type="text/css">
.custom-msg {
z-index: 1000;
position: absolute;
background-color:#eee;
border: 1px solid black;
padding: 5px;
color: #1800ff;
}
</style>
Tidak ada komentar:
Posting Komentar