Monday, June 18, 2007

Disable Copy and paste

Thinking of a way to make it more difficult for people to copy the contents of your blog? Here's a neat little JavaScript that will disable Copy and Paste.

<!-- Disable Copy and Paste-->
<script language='JavaScript1.2'>
function disableselect(e){
return false
}
function reEnable(){
return true
}
document.onselectstart=new Function (&quot;return false&quot;)
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

Insert the code between the <head> and </head> tag.

However, there is no guarantee way to prevent your contents from being stolen.The JavaScript above can be easily bypassed by an experience internet user. E.g. If the browser's JavaScript is disabled, the code will not work.

An alternative way to protect your work is to use Copyscape. You can read more about it here.

69 Comments:

  1. MKF said...
    Thank u, Ive been looking all over for this script!
    Anonymous said...
    that is a nice script you introduction.
    DailyDiva said...
    Thanks for the script!
    Zi said...
    Thanks a lot mate, this really made my day!
    Tech Junkie said...
    thanks
    I was looking for this script...
    Rohit Dhawan said...
    thanks! very useful
    Unknown said...
    thanks.. it is working.. and is very usefull
    Shahroze said...
    how do u disable Select All or Like Highlighted text? cuz, people can still copy by hitting Ctrl + C !!
    അനില്‍ശ്രീ... said...
    Thinking of a way to make it more difficult for people to copy the contents of your blog? Here's a neat little JavaScript that will disable Copy and Paste.
    < !-- Disable Copy and Paste-- >
    < script language='JavaScript1.2' >
    function disableselect(e){
    return false
    }
    function reEnable(){
    return true
    }
    document.onselectstart=new Function ("return false")
    if (window.sidebar){
    document.onmousedown=disableselect
    document.onclick=reEnable
    }
    < /script >Insert the code between the < head > and < /head > tag. However, there is no guarantee way to prevent your contents from being stolen.The JavaScript above can be easily bypassed by an experience internet user. E.g. If the browser's JavaScript is disabled, the code will not work.



    I COPIED THIS FROM YOUR POST ONLY BY USING THE "Show Original Post" LINK.

    HOW WE CAN HIDE THIS LINK IN COMMENT AREA ?
    Kaushik said...
    Google Custom Search gets disabled.....SHIT
    Unknown said...
    thanks..but i can still copy via select all + Ctrl C
    Anonymous said...
    thnx for the post but i couldnt understand where 2 head tags are could u [plz help me?
    Δημ.Σχολείο Γαυρίου said...
    Thanks for this code. I needed this
    Pooja said...
    Thanks a lot. This worked :)
    CrunchNet said...
    Thanks for the Code, It's work fine.
    Admin said...
    really thanks for the code but the thing is one can easily copy the content by selecting CTRL + A then copy....is there any other code to disable this feature too
    Unknown said...
    thaaaaaanks maaaaan
    the code is working
    i was r\try it on my blog

    www.forextrading-2008.blogspot.com

    but just disable right click
    Anonymous said...
    Thanks for this, but CTRL+A will still select. Anyways. thanks for sharing!
    chan said...
    This comment has been removed by the author.
    chan said...
    Hi,
    this is not working in Mozila FireFox. Can u give the solution.
    Anonymous said...
    terimakasih! been looking for this... you are most gracious! ;-)
    Angeline said...
    i couldn't use this code...
    ermm...as i don't know how to put it in my template...any idea how??Thanks alot!
    Indian Brain said...
    Funny Jokes : Big collection of jokes on various topics such as funny sms, cool jokes, sardarji jokes, husban & wife jokes, bar jokes, political jokes & More.
    -Gek- said...
    It really works in my blogspot, thanks a lot!
    I owed you!
    islam sami said...
    This is really a nice post. Obviously, you are putting a lot of hard work on your blog. I'm sure I'd come back here more often. You can also visit my blogs about
    Currency Trading News & BROKERS
    http://start-forex-09.blogspot.com/
    http://fx-way1.blogspot.com/
    Nova York said...
    Thans for charing this code, it is being used on my blog now www.bluecaffe.blogspot.com
    Thanks again
    Anonymous said...
    i cannot copy ur code man., i u"ll not allow people to copy that thing, then why have u created such poast..???
    Anonymous said...
    i cannot copy ur code man., i u"ll not allow people to copy that thing, then why have u created such poast..???
    SAMIR R. BHOGAYTA said...
    I had been used this code, but it is not working right now. Please reply as soon as possible.
    Sabrina said...
    yay!! Thanks so much!
    Muhammad.Ali said...
    thanks for this
    Hasanka (D)-n◯⏉e™ said...
    Thanks... :)
    أنس رفعت said...
    thnx alot 4 sharing
    Faizan Ben 10 said...
    This comment has been removed by the author.
    Faizan Ben 10 said...
    This comment has been removed by the author.
    Gowri said...
    Thank you, works like a charm.
    Soyez les bienvenus! said...
    thanks, it works.
    Faizan Ben 10 said...
    if you want that no one can copy your document even by pressing
    (ctrl+c)log on to my blog faizan448.blogspot.com
    Vinod Kumar Tadiparthi said...
    thnx...dude........
    shorty said...
    where will i post this after copying the code?please reply to my blog
    lifesoshorty.blogspot.com
    VSRANKAWAT said...
    your navigation is quite markable, thanks buddy
    Yudi Widiawan said...
    Oh thanks a lot, this is work on my blog ...
    unjudge said...
    TQ cery much... Really working in my blog :)
    विद्या said...
    Thanks for sharing this code.
    Ajay K Malik, PhD said...
    Thanks for sharing the code. Very useful. I inserted the code just before /body as well as /head tags.
    Ajay K Malik, PhD said...
    doesn't protect from Ctrl-U that displays all code (along with content) or clicking and copying pictures
    Arran Rice said...
    thankyou
    Enjaye Riyu said...
    wow. this is really a great help.. im so happy.. thank you! :)
    Anonymous said...
    Thank you so much, i found this through another user but this will help lots :D
    Tuan Tanah said...
    it works on mine !! thank you so much !!
    Dianne Heath said...
    This code is absolutely amazing!
    Rattus said...
    Thank you very much! I love you because you are my hero! It works!

    Please check it out here:
    http://rattuschoki.blogspot.com
    Mahmoud Adly Ezzat said...
    Thanks ...
    Sathyaseelan said...
    nice ...
    Linker said...
    Nice work :)
    Linker said...
    This comment has been removed by the author.
    Emilly Amisa said...
    thx~ working just right with me~
    Sherif Kamel said...
    thxx :D it worked great for me too on my blog
    http://dll-spot.blogspot.com/
    fanpixx said...
    Anonymous said...
    is this really work? anyway thank you about this!
    Jigz said...
    Hello im using the script and great really workds... Bet Safe was here for support, feel free to please visit me back and support:)
    Navneet Singh Chauhan said...
    Thanks a lot. I have applied it on my blog http://navneetsinghchauhan.blogspot.com and it is working quite well. :)
    Unknown said...
    Amazing dude you are amazing it really works
    Atif Imran said...
    gud tricky code man
    http://www.cell4review.com/
    naveen genuine said...
    thankxx
    RD said...
    Thanks! this is what I'm looking for.... :D
    Elal Lasola said...
    Thank you. Very helpful! :)
    Anonymous said...
    Hi friends,

    Disabling copy and paste is essential if you are letting other people use your computer. It is possible on windows based systems to turn off or disable completely the copy and paste function. There are a few programs that will not only disable copy and paste, but also cut, delete, rename and so on, preventing anyone from editing your crucial data. Thank you...

    Anti Piracy
    ASAAM DK said...
    HI It's really Super's

Post a Comment