Catatan kali ini berisi tentang script yang dapat digunakan untuk menonaktifkan fungsi blocking pada teks di blog kita. saya baru mencoba di blog ini (berbasis blogspot). Mungkin bisa digunakan juga pada blog yang lain.
![]() |
| No Piracy |
Efek dari penambahan kode ini adalah, text pada blog kita tidak dapat di block dan fungsi klik kanan menjadi non aktif. Manfaatnya akan menyulitkan pelaku piracy untuk men copy paste posting yang kita buat.
caranya gampang sekali, cukup copy dan paste kode di bawah ini ke kode html blog. copy di bawah kode </body>
script nya adalah :
<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>
Catatan:
pada saat mengganti template, otomatis script/kode diatas akan ikut hilang beserta fungsi copy paste blocking. copy kembali kode diatas untuk mengaktifkan fungsinya.
Selamat mencatat!!!
//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>
Catatan:
pada saat mengganti template, otomatis script/kode diatas akan ikut hilang beserta fungsi copy paste blocking. copy kembali kode diatas untuk mengaktifkan fungsinya.
Selamat mencatat!!!

No comments:
Post a Comment