How to disable right click on website or blogspot blog


You always want to prevent other bloggers from copying the content published by you with hard labor. One way to achieve this is to disable right click on your blog or website page to protect your content from being stolen. Here I will show you how to disable right click just by using simple java script.

Disable right click on website or blogspot blog
How to disable right click on website or blogspot blog

Steps you have to perform
  • For Bloggers

1. Login to blogger account. Navigate to Layout section of your blog.

How to disable right click on website or blogspot blog

2. Click on "Add a Gadget" and select "HTML/JavaScript".

How to disable right click on website or blogspot blog


3. Copy and paste below code into it and click on "Save".
<script language="JavaScript">
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
</script>
<!--Code End http://www.funwithtricks.com>
How to disable right click on website or blogspot blog

4. Now reload your blog and check by right clicking anywhere on webpage. It should be blocked!

  • For Websites
Copy above code and paste into <head> or <body> section of your website. This will block right click functionality on your webpage.


Link your website with us for free!



author

About Author

I’m Vinay Vernekar , a young Entrepreneur and a Technology blogger, currently living in Kolhapur, Maharashtra, India. Founder and Main author of Fun With Tricks. I am also running web hosting services at Host With Us and King Of Web Host. if you like this article, pin it with social media, subscribe to our newsletter. Follow me on Google Plus, Facebook, Linkedin and Twitter.

Know more about me!

Mail me your quries at admin@funwithtricks.com

Get Free Email Updates to your Inbox!

Post a Comment

You are always welcome to leave valuable feedback!