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.

72 Comments:

  1. Mialicious said...
    Thank u, Ive been looking all over for this script!
    Etienne said...
    that is a nice script you introduction.
    DailyKirukkal said...
    Thanks for the script!
    Zi & Ck 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
    Alex Jose 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 ?
    KC said...
    Google Custom Search gets disabled.....SHIT
    chirpy-paaro said...
    thanks..but i can still copy via select all + Ctrl C
    ⋙⋙D € € p ╚╝⋘⋘ 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.
    IrsH 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
    محمود جمال 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
    Zychr 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.
    Asha Ray 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!
    start-forex 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/
    Sueli Schmitt said...
    Thans for charing this code, it is being used on my blog now www.bluecaffe.blogspot.com
    Thanks again
    Bharat said...
    i cannot copy ur code man., i u"ll not allow people to copy that thing, then why have u created such poast..???
    Bharat 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 BHOGAYTA said...
    I had been used this code, but it is not working right now. Please reply as soon as possible.
    Kristin said...
    yay!! Thanks so much!
    Muhammad.Ali said...
    thanks for this
    srujan said...
    thank Q i have been looking for this
    D-Note said...
    Thanks... :)
    Anas M.Refa't said...
    thnx alot 4 sharing
    Faiza Ben 10 said...
    This comment has been removed by the author.
    Faiza 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.
    Faiza 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
    M. Daniyal Iqbal said...
    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 ...
    Aida Hazlan said...
    THANK YOU VERY MUCH. IT WORKS ON MY BLOG. :)
    Snow Princess said...
    TQ cery much... Really working in my blog :)
    vidya palkar said...
    Thanks for sharing this code.
    MissionTumor said...
    Thanks for sharing the code. Very useful. I inserted the code just before /body as well as /head tags.
    MissionTumor said...
    doesn't protect from Ctrl-U that displays all code (along with content) or clicking and copying pictures
    arran rice said...
    thankyou
    ENJAYE said...
    wow. this is really a great help.. im so happy.. thank you! :)
    lady oblivion said...
    Thank you so much, i found this through another user but this will help lots :D
    Fatin Azwa said...
    it works on mine !! thank you so much !!
    Dianne Heath said...
    This code is absolutely amazing!
    Rattus Choki 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 ...
    சத்யன் 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~
    SђЄriF MoђsЄn kamel 'sђêkÔ said...
    thxx :D it worked great for me too on my blog
    http://dll-spot.blogspot.com/
    fanpixx said...
    Joe said...
    is this really work? anyway thank you about this!
    eironn813 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 said...
    Thanks a lot. I have applied it on my blog http://navneetsinghchauhan.blogspot.com and it is working quite well. :)
    Apace World 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 | The Shades of Grey said...
    Thank you. Very helpful! :)
    Vicky Milza 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