How can I disable right click, Ctrl+C, Ctrl+A in my blog?

Le hoang February 26, 2010
Pinterest Stumbleupon Whatsapp

Hi all,
I’m looking for a code that can disable right click, Ctrl C and Ctrl A for my new blog. Please help me.

  1. Fauzan Al-Rasyid
    March 6, 2012 at 7:55 am

    To disable "Ctrl + C" put this script.

    function keypressed() {;return false;}document.onkeydown=keypressed;// End  -->

    Then put this script to disable the right click:

    var message="Function Disabled!"; function clickIE4(){ if (event.button==2){ alert(message); return false; } } function clickNS4(e){ 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=clickNS4; } else if (document.all&&!document.getElementById){ document.onmousedown=clickIE4; } document.oncontextmenu=new Function("alert(message);return false")

    Put both script before the HEAD tag.

  2. Jay
    December 16, 2011 at 2:24 pm

    It will require a few clicks to copy, no matter whatever restrictions you apply.
    you will hardly see text copying disabled on popular sites.
    for example this one.

  3. prevention
    December 8, 2011 at 12:38 pm

    Can someone email me the code to disable the highlighting of text in firefox as the code on that website you lot provided only works in exploror

    Email: super_venom1@yahoo.co.uk

  4. smartcoder
    November 19, 2011 at 7:47 pm

    You cannot disable control c or control v as this is a operating system functionality that cannot be disabled by the browser.

  5. Ladyaec
    September 21, 2011 at 11:49 pm

    Houdini plugin works for disabling select all. I need to disable ctrl I in safari though. 

  6. Augadha
    September 5, 2011 at 12:39 pm

    nice job, it worked for me.

  7. 7og4nk
    February 17, 2011 at 6:45 am

    7og4nk.blogspot.com Find the real place for your vacation

  8. Guest
    February 6, 2011 at 8:51 pm

    Please give idea to disable Ctr+c.

  9. Aibek
    February 27, 2010 at 7:57 am

    Just found something specifically for WordPress users. A plugin to "PROTECT YOUR BLOG CONTENT FROM THEFT". Check out WP Protect.

    • professional thesis writers
      December 13, 2010 at 1:59 pm

      This plugin is just perfect! Thanks finding and sharing it

  10. Aibek
    February 27, 2010 at 7:28 am

    I would recommend using the Javascript as well. It would keep your content search engine friendly while disabling the keyboard keys to copy the content.

    • Le Hoang
      March 2, 2010 at 1:01 pm

      Can you guide me please?

      • Aibek
        March 3, 2010 at 10:10 am

        Basically, if you're using WordPress then just install the above mentioned WP Protect plugin and follow their instructions on how to activate the pugin.

        If your blog is not running on WordPress, then all you need to do is open one of your template files (header.php, footer php etc.) and copy the Javascript code from following site (see link below) somewhere inside and save it.

        http://www.hypergurl.com/norightclick.html

        • Le Hoang
          March 3, 2010 at 11:42 am

          Thanks :) but what about disable Ctrl A and Ctrl C? :(

        • Aibek
          March 3, 2010 at 7:07 pm

          If you implement the recommended methods it will disable those
          functionalities.

          Aibek

        • Sana Makeupoholic
          July 19, 2011 at 12:27 pm

          hi , thnx for ur help bt its not working for me i gt this msg when i try to save code before tag 
          Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. 
          XML error message: Open quote is expected for attribute "{1}" associated with an element type "language".

        • Sana Makeupoholic
          July 19, 2011 at 12:28 pm

          hi , thnx for ur help bt its not working for me i gt this msg when i try to save code before tag 
          Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly. 
          XML error message: Open quote is expected for attribute "{1}" associated with an element type "language".
          plsssssssssssss help 

        • Muhammad Asad Ali
          February 1, 2012 at 1:36 am

          please paste the code in add a gadget

    • Jack Cola
      March 7, 2012 at 1:55 pm

      The only problem with JavaScript is that you can right click, select all, and then click copy. Or, open up the source code, copy the HTML, paste it in an editor such as FrontPage, Dreamweaver, then copy the content from there (after you delete the javascript code). There's ways around everything.

      You could also possibly print it to PDF, and copy it from that file.

      • Aibek
        March 8, 2012 at 7:08 am

        good point! )

  11. Jack Cola
    February 26, 2010 at 11:07 pm

    The easiest thing to use is to use Javascript

    Have a look at this website http://www.hypergurl.com/norightclick.html

    But if someone wants to copy your content, they can. It will just make it harder and more time consuming to use.

    In my courses at CreateASuccessfulblog.com, I store all my content on http://www.scribd.com/, make the document private, disable downloads, printing, and copying, and encrypt the html and add that code to a webpage.

    That may be another method that you use.

    • Aivi Remulla
      May 27, 2011 at 4:41 am

      That is a good trick... nice... though at first I only like to disable ctrl-c.  But your simple code provides big help, thanks...

      • Jack Cola
        May 27, 2011 at 4:53 am

        I am glade it was helpful for you.

Ads by Google