Saturday, February 25, 2017

Cara Memasang Kode ( Disable ) Anti Klik Kanan dan Anti F12

Cara Memasang Kode ( Disable ) Anti Klik Kanan dan Anti F12

Assalamualaikum, kali ini saya ingin kembali share tentang Cara Memasang Kode ( Disable ) Anti Klik Kanan dan Anti F12. Dan kode yang akan saya bagikan dibawah ini support untuk semua browser. 

Sebenarnya kode kode ini fungsinya hampir mirip seperti tutorial sebelumnya yaitu Cara Memasang Kode Anti Ctrl+U dan Ctrl + Cdi Blog, sama sama berfungsi menghindari plagiat/jiplak baik kode ( source code ) ataupun konten Blog Anda.


Cara Memasang Kode ( Disable ) Anti Klik Kanan dan Anti F12


1.Masuk ke Blogger >> Edit HTML, letakkan kode dibawah ini sebelum kode </head>


<script language="JavaScript">
//Non Aktifkan tombol F12
//visit http://crepictdesign.blogspot.co.id/
    document.onkeypress = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
           //alert('No F-12');
            return false;
        }
    }
    document.onmousedown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
document.onkeydown = function (event) {
        event = (event || window.event);
        if (event.keyCode == 123) {
            //alert('No F-keys');
            return false;
        }
    }
//Non Aktifkan Klik Kanan
//visit http://crepictdesign.blogspot.co.id/
var message="Dilarang, Copy Paste Konten Blog ini..!";
///////////////////////////////////
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")
//
function disableCtrlKeyCombination(e)
{
//list all CTRL + key combinations you want to disable
var forbiddenKeys = new Array('a', 'n', 'c', 'x', 'v', 'j' , 'w');
var key;
var isCtrl;
if(window.event)
{
key = window.event.keyCode;     //IE
if(window.event.ctrlKey)
isCtrl = true;
else
isCtrl = false;
}
else
{
key = e.which;     //firefox
if(e.ctrlKey)
isCtrl = true;
else
isCtrl = false;
}
//if ctrl is pressed check if other key is in forbidenKeys array
if(isCtrl)
{
for(i=0; i<forbiddenKeys.length; i++)
{
//case-insensitive comparation
if(forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase())
{
alert('Key combination CTRL + '+String.fromCharCode(key) +' has been disabled.');
return false;
}
}
}
return true;
}
</script>

2. Kemudian Save Template Anda

Silahkan masuk ke Blog Anda dan coba lakukan klik kanan dan F12. Semoga bermanfaat.. Silahkan tinggalkan komentar jika ada permasalahan terkait tutorial diatas
 

Elm0D

Author & Editor

Has laoreet percipitur ad. Vide interesset in mei, no his legimus verterem. Et nostrum imperdiet appellantur usu, mnesarchum referrentur id vim.

0 comments:

Post a Comment

Navigate» Become author for this Blog

Manual Categories