Tuesday, March 14, 2017

No right click

Beberapa orang mungkin tidak nyaman ketika konten blog mereka ditiru secara keseluruhan alias copy paste konten.Salah satu alasannya mungkin karena sudah lelah menulis ternyata dengan mudah di plagiat oleh orang lain tanpa menyebutkan sumbernya.Salah satu etika blogging yang baik adalah ketika sesorang meniru atau meminjam konten harus disertai sumbernya refrensinya.Contohnya saya memberikan sumber ketika memodifikasi widget..hehehe Kali ini saya mau share untuk meminimalisir resiko copy paste konten blog atau website menggunakan penggabungan script antara Javascript dan CSS.

Tahap ke 1 :
Letakkan kode berikut di atas </head> :

<script type="text/javascript">
//<![CDATA[  /* No Right Click */
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;}
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;}
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//]]>
</script>
Tahap  ke 2 :
1. Cari kode <body> lalu edit menjadi <body oncontextmenu=”return false;” >
2. Cari kode ]]></b:skin> letakkan kode berikut diatasnya :
.body { -webkit-user-select: none; /* Chrome all / Safari all */ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Firefox all */ -ms-user-select: none; /* IE 10+ */ -o-user-select: none; user-select: none; } img { -webkit-touch-callout: none; -webkit-user-drag: none; -khtml-user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; user-drag: none; } .noselect { -webkit-touch-callout: none; /* iOS Safari */ -webkit-user-select: none; /* Safari */ -khtml-user-select: none; /* Konqueror HTML */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* Internet Explorer/Edge */ user-select: none; /* Non-prefixed version, currently supported by Chrome and Opera */ }
Selectable text.
Unselectable text.
*.unselectable { -webkit-touch-callout: none -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; /* Introduced in IE 10. See http://ie.microsoft.com/testdrive/HTML5/msUserSelect/ */ -ms-user-select: none; user-select: none; } function makeUnselectable(node) { if (node.nodeType == 1) { node.setAttribute("unselectable", "on"); } var child = node.firstChild; while (child) { makeUnselectable(child); child = child.nextSibling; } } makeUnselectable(document.getElementById("foo")); $('img').mousedown(function (e) { if(e.button == 2) { // right click return false; // do nothing! } } img { pointer-events: none; } @media print { html, body { display: none; /* hide whole page */ } } for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"')) {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";




Fungsi script tersebut adalah pengabungan untuk menghindari copy paste tulisan melalui seleksi text dan disable right click.Pada browser terdapat fitur Javascript sehingga perlu kombinasi untuk mencegah ketika javascript di non aktifkan.Secara teknis sebenarnya ada banyak trick mengambil konten sehingga trick tersebut diatas tetap memiliki keterbatasan karena 2 hal yaitu standar world wide web,pengembangan dan update browser.Silahkan dicoba...

Share:
Chinese (Traditional)DutchEnglishFrenchGermanIndonesianItalianRussianSpanish

Protected by. DMCA

Categories

Ticket & Hotels

banner


PR Checker

www.PRchecker.info

Blogging Fusion

Blogging Fusion Blog Directory