How To Disable Right Click And Text Selection In A blogger Bloog Or Website . Protect Your Content.
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
- Go to blogger layout Page
- Add any where HTML/JAVA Script widget
- 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
- Go To Layout of your blog
- Add and HTML/Java Script Widget
- 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.
Thanks so much! God bless
ReplyDeletegonna try this one!!!
ReplyDeleteTrue-Speak
hank you for shedding light on this technology. I will be sharing this post with my friends and colleagues who are passionate about optimizing their xml epg guide. Keep up the excellent work!
ReplyDelete