Wednesday, July 17, 2013

How To Disable Right Click And Text Selection In A blogger Bloog Or Website . Protect Your Content.

How To Disable Right Click And Text Selection In A blogger Bloog Or Website . Protect Your Content.


Copyright

The protecting the web content and images is the most important part of blog and Websites. Many people just copy the content from the other websites and paste them in there websites.So the question arises is there any simple codes which we can us to protect the content from the thieves . The answer is yes and i am sharing you with this useful trick to safeguard your webcontent. 

The two Different Html Codes i will share with you . 

1. To Protect Images 
2. To Protect the Web Content 

DISABLE RIGHT CLICK IN A BLOG 

To disable right click in your blogger just

  1. Go to blogger layout Page
  2. Add any where HTML/JAVA Script widget
  3. Paste the below given script and hit save

<!--code by  http://dailybloggiingtips.blogspot.com -->
var message = "function disabled";
function rtclickcheck(keyp){ if (navigator.appName == "Netscape" && keyp.which == 3){ alert(message); return false; }
if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) { alert(message); return false; } }
document.onmousedown = rtclickcheck;
</SCRIPT>

DISABLE CONTENT SELECTION IN BLOGGER 



If you want to Disable content selection by mouse in your webpage then

  1. Go To Layout of your blog
  2. Add and HTML/Java Script Widget
  3. Paste the given below script and Hit Save 

<!—code by  http://dailybloggiingtips.blogspot.com -->
<script type="text/javascript">
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>




Please Like and Share if you find this post useful. 
Any Questions relating this tutorial , please comment below.






4 comments:

Post a Comment