Tuesday, 16 June 2015

HOW TO DISABLE RIGHT CLICK ON YOUR BLOG..

If you own a blog or a website then you always want to prevent other malicious bloggers from copying the content from your blog. You might have written an article with great efforts and lots of research and other just copy/paste it on their blog. To prevent such users from copying content from your blog i will show you Javascript Trick to disable right click on your blog. So lets get started.










How To Disable Right Click On Your Blog ?


1:-Get to your blogger Dashboard and then Click on Layout.

2:-Now Click on Add Gadget and select Html/Javascript.
   
3:- Select 'HTML/Javascript' and add the code given below and click 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>

4:-Save it and done. Now users will not be able to right click on your website.

PLEASE SHARE IF YOU LIKE IT

No comments:

Post a Comment