Hi everyone, in this article, I am going to talk about how to disable right-click in Blogger. You will have seen that some bloggers do not allow the copying of their blog content and therefore disable the right mouse button on their blog.
This means that when you select text on your blog and right-click to copy that content, it won’t work. As such, going beyond copy and paste is essential, but what can people who want to copy articles from our blog do when the AGC tool becomes more and more sophisticated? Essentially, bloggers copying posts will use the AGC tool to re-enable copy and paste on their website, so they can easily copy the post from your blog.
It’s a shame that someone steals our researched and written articles from our blog. But what if the right-click is disabled due to not using features like copy and paste on our site? In this article, I will share a tutorial on how to disable right-click, so please read the article till the end.
Using Html
Step 1:- First Go To Blogger.Com Then Login Your Account.
Step 2:- Then Click on Theme Menu.
Step 3:- After clicking on Edit Html.
Step 4:- Then Copy The Given Html Code and Put it Under <body>
.
<b:attr name='oncontextmenu' value='return false'/><b:attr name='onkeydown' value='return false'/><b:attr name='onmousedown' value='return false'/>
Step 5:- Finally, Don’t Forget To Click on Save.
Using JavaScript
Step 1:- First Go To Blogger.Com Then Login Your Account.
Step 2:- Then Click on Theme Menu.
Step 3:- After clicking on Edit Html.
Step 4:-Then Copy The Given JavaScript Code and Place it Above </body>
.
With Alert Notifications
<script>/* Right Click Disable JavaScript Mobicomp Tech */document.addEventListener("contextmenu", e => {alert("Right Click Disabled");e.preventDefault();});</script>
Without Alert Notifications
<script>/* Right Click Disable JavaScript Mobicomp Tech */document.addEventListener("contextmenu", e => {e.preventDefault();});</script>
Stay connected With itsutkarshk And Follow Us On Instagram & Facebook Subscribe to Our YouTube Channel