mrtechhive title BG

How to Disable Right-Click on Your Blogger

Why Need To Disable Right-Click on Your Blogger? As a blogger, you work hard to create valuable content for your readers. However, it can be frustrating when others copy and modify your posts without your permission. This not only diminishes the value of your work but can also harm your SEO efforts. Fortunately, there is a simple solution: Disable Right-Click on Your Blogger.

Disabling right-click prevents users from copying or saving your images or text by right-clicking on them. In this comprehensive guide, we’ll show you how to disable right-click on your Blogger blog step-by-step. We’ll also share tips for customizing the code to suit your needs.

Log in to Your Blogger Dashboard

To get started, log in to your Blogger dashboard. Once you’re logged in, click on “Customize” and then “Edit HTML” from Themes.

Blogger Dashboard

Add the First Code

Once you’re in the HTML editor, scroll down until you find the “</body>” tag. Paste the following code just above it:

Disable Right Click
<script>
$('body').bind('copy cut drag drop', function (e) { e.preventDefault(); });
</script>

This code prevents users from copying, cutting, or dragging your content. It’s a simple but effective way to protect your posts.

Add the Second Code

Next, you’ll need to add a CSS code that prevents text selection. Replace “]]></b:skin>” with the following code:

Disable Right-Click
body{user-select:none!important;-moz-user-select:-moz-none!important;-webkit-user-select:none!important;-ms-user-select:none!important}.post-body blockquote,.post-body code,.post-body pre{user-select:text!important;-webkit-user-select:text!important;-ms-user-select:text!important;-moz-user-select:text!important}

]]></b:skin>

<style type='text/css'>
body{
display:block;-khtml-user-select:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
-o-user-select:none;
user-select:none;
unselectable:on;
}
</style>

This code prevents users from selecting any text on your blog. It’s a more advanced method of protection and can be useful if you have a lot of text-based content.

Customize the Code (Optional)

If you want to customize the code to suit your needs, you can do so by changing the values in the CSS code. For example, you can change “user-select:none” to “user-select:text” if you want users to be able to select text but not copy it. You can also change the “!important” value to “initial” if you want to override the code in specific cases.

If you’re looking to enhance the visual appeal of your website and provide a better user experience to your visitors, one way to do that is by adding a scrollbar in WordPress using custom CSS. Read more

Save and Refresh Your Blog

Once you’ve added the code and customized it (if necessary), click on “Save.” If no errors occur, then you’re all set. Refresh your blog, and now no one can copy your post.

Conclusion

Disabling right-clicking on your Blogger blog is a simple but effective way to protect your content from being copied and modified without your consent. By following our comprehensive guide, you can disable right-click and customize the code to suit your needs. We hope this guide has been helpful to you. If you have any questions or concerns, feel free to leave a comment below. Don’t forget to share this post with others who may find it useful!

Leave a Reply

Your email address will not be published. Required fields are marked *