standard post format icon

No Right Click

I would like to thank all of you who commented on my previous post about my plagiarized poem.

Although we really can’t stop people from copying our own articles, I thought of making it more difficult for them. Again, it won’t prevent theft, but it will definitely make it harder for them to copy & paste my poems. That’s why I am using the no right click and disable select script again.

Few years ago, I used the no right click and disable text select script I got from Dynamic Drive. That script prevents the user from right clicking and from selecting text in my site. But when I migrated to WordPress two years ago, I didn’t include it in my header files. When I was still using that Javascript file, I didn’t see any copy of my poems, not unless Google wasn’t able to detect it using my “search queries”.

And now that there are more than 10 direct copies of my poems, I realized I should be using that Javascript again.

Though I’ve seen several sites that uses the no right click function, people can still easily copy the content of the site by pressing Ctrl+C. But with the disable text selection script, you can not select any text from a page and you can’t even use Ctrl+A or select all. If you can’t select a text, obviously you can’t copy the text directly. The only thing you can do to copy the text is by saving the entire page in your computer or by viewing the source code.

Here’s the Javascript code for image and text protection with a pop up message I found from BluePark Solutions.

<SCRIPT language="JavaScript">
<!--
var message="Copyright ©2008 Your Company Ltd. All Rights Reserved.";
function clickIE() {if (document.all) {alert(message);return false;}}
function clickNS(e) {
if (e.target.type == "text") { return true; }
if (e.target.type == "textarea") { return true; }
if (e.target.type == "submit") { return true; }
if (e.target.type == "checkbox") { return true; }
if (e.target.type == "radio") { return true; }
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=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

function noclic(clic) {
var msg="Copyright ©2008 Your Company Ltd. All Rights Reserved.";
if (navigator.appName == 'Netscape' && clic.which==3) {
alert(msg);
return false;}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
return true;
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown = noclic;
// -->
</SCRIPT>

<SCRIPT language="JavaScript">
function disableselect(e){
    if (e.target.type == "text") { return true; }
    if (e.target.type == "textarea") { return true; }
    if (e.target.type == "submit") { return true; }
    if (e.target.type == "checkbox") { return true; }
    if (e.target.type == "radio") { return true; }
    if (e.target.type == "password") { return true; }
    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>

If you are annoyed with the pop up message and don’t want to use it, there’s another script for that in the link above.

You can put this code right before the </head> tag of your header file. I saved mine in one file and just used <script type=”text/javascript” src=”path/to/file/noright.js”></script> right before the </head> in header.php.

If you want to see it working, you can visit My Destiny poem or any of my poems and the submitted poems.

37 thoughts on “No Right Click

  1. thanks for sharing the code!

    don_Ser´s last blog post..Mamimigay ng P500 si don_ser sa Top Commentator!

  2. This is good idea, Amor. Para di na manakaw ang mga poems mo. That script on no-right click (image) is a bluff talaga. I did steal a photo from a site where my friend published her photos, then the site prohibits right-clicking. Hindi niya kasi ako binigyan ng pic kaya ninakaw ko na lang, hahaa!

    Marlene´s last blog post..Silly Really Per Gessle

    • Mahirap ngang magcopy ng picture sa no-right click, either hanapin mo sa temporary Internet files folder, or save mo buong page or PrintScreen. Makokopya pa rin diba, pero may extra effort. 🙂

  3. this is a good idea…correct ka jan, at least if they really want to copy your poems eh mahirapan naman sila magre-type total gusto na rin naman nilang magkopya eh di carreer-rin na rin nila ang pagtytype hehehee…

    melody´s last blog post..I am Grateful

    • Korek! at kung tamad naman sila mag retype or ang alam lang nila eh copy-paste, hindi na lang nila kokopyahin yun. Maghahanap na lang sila ng ibang madaling makopya, diba?

      Amor´s last blog post..No Right Click

    • Not here, Ambo. No right click and no text select is activated only in poems.

      Okay, nakita mo na pala haha… You may want to try it again, kaya siguro sila nagsasabing istorbo kasi they want to copy somethng from your site, at kapag no right click nga talagang istorbo, hehe.

      Amor´s last blog post..No Right Click

  4. hinahanap ko ang comments ko dito sa post na ito kasi galing na ako dito nung minsan, sabi ko bakit nawala. yun pala di pa ako nakakapag comment haha. Toink!

    dati my anti right click ako pero nahihirapan ako kasi usually when I post an entry with so many links I tend to right click my own blog and copy link location especially when Im in a hurry to link up some of my old post.

    Tama si Diwa, sa firefox meron din yung feature na view page source na pwede mag copy.

    if only there is a plugin that will disable even those things and allow only the user to right click in his own blog.

    bluepanjeet´s last blog post..Waiting in vain

  5. Hello po sa friendster site po ba pwede ilagay yung no right click code?madami po kasi nnagnanakaw ng picture ko na walang paalam kahit pa naka not allowed photo grabbing:(Saan po dapat i paste yung code?

    • Sorry, I don't think it's possible. If ever, sa profile lang mismo yung no right click at hindi sa photos.

      Saw your FS profile, pretty ka kasi kaya boys can't help but copy your pics. Restricted naman profile mo so most probably mga friends mo din nagcopy. Kahit hindi allowed ang photo grabbing they can still download JPEG images directly to their PC. You can apply watermarks and copyright stamps on your pics before you upload it in FS pero hindi pa rin mapipigilan yung iba na i-copy yun, pero at least mababawasan.