Sign in
Log inSign up

How to Disable Copy Paste in Blogger using Javascript?

Hello Friends, today I am going to share with you how to Disable Copy Paste in Blogger using Javascript.

Bhavya Shah
·Oct 30, 2021·

1 min read

How to Disable Copy Paste in Blogger using Javascript?

Do you want to disable copy-paste in Blogger blog? Today I will show a simple 5 steps process to disable copy paste in Blogger blog starting from starting, uploading that blog, adding code & what to do to disable Copy Paste in your blog's HTML code.

5 Simple Steps to disable copy/paste in blogger.

  1. log in to the Blogger Account Dashboard
  2. Now Go to the Theme Section
  3. In the Theme Section go to customize with Edit HTML
  4. Now Search tag using Ctrl + F
  5. Copy the code below and paste it before the tag.
<script>
        // Code Developed by BlogTriggers Team members
        window.onload = function() {
            document.addEventListener("contextmenu", function(e) {
                e.preventDefault();
            }, false);

            function disabledEvent(e) {
                if (e.stopPropagation) {
                    e.stopPropagation();
                } else if (window.event) {
                    window.event.cancelBubble = true;
                }
                e.preventDefault();
                return false;
            }
        };
        document.onkeydown = function(e) {
            return false;
        }
        navigator.keyboard.lock();
    </script>

I hope you Find these Post Useful

Read Our Other Posts:

Create Responsive Multiple Tabs in Blogger Posts

Add Telegram Share Button in blogger

Create Faq Accordion in blogger Posts

How to add XML & HTML sitemap in Blogger

Create Responsive form for blogger

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct