Tuesday 4 June 2013

How To Disable Selection In Blogger

In my previous post i told you about how you can prevent your blog content from copying by disabling right click. But this method has various disadvantages too like it does not allow readers to even open link in new tab or copy URL address which really irritates them a lot. I don’t mean that you don’t use that method as it can prove successful in monetary blogs. So i have another option for you i.e by disabling text selection.

This method involves just disabling text selection which means that you cant just select text on the webpage rest everything works as it is.
Disable Selection In Blogger

How To Disable Selection In Blogger

To disable selection color in Blogger you don’t need to do anything time-consuming.
Just go to Blogger dashboard >> Layout >> Add Gadget >> HTML/Javascript and paste the below code in it.

<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>

umang

Hi this is umang, Founder of TechnoRoots.i am a computer science student and a very passionate techno lover guy who loves technology more than anything else. Stay in love with TechnoRoots for getting all the latest updates in Tech and Computer World.

0 comments:

Post a Comment

 

Share it

twitter  facebook  google plus  linkedin 

Total Pageviews

Disclaimer

All the links and files in this website is not hosted by technoroots.in. If any blog or website having any query with the content we post, please contact us at support@technoroots.in

Softwares-Let's Explore The Software World | 2014

E:support@technoroots.inDeveloped By : Umang Patel Gadget Geeks