// // Leave a Comment

How To Disable Text Selection In Blogger

Hy friends, In this article I am going to show you interesting Blogger trick, by which you can disable text selection. Anybody who will vist your blog will not be able to copy your content, hence you can keep complete privacy of your text.
Without further wasting of time, let me show you how to do it.

1. Go to Blogger

2. Selet your blog.
3. In your dashboard, go to Layout and then click on Add a Gadget
4. Select HTML/JavaScript
5. Copy and paste this code below:
<script type="text/javascript">
/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//form tags to omit in NS6+:
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>

6. Then save the widget and you’re done.

Go ahead and try selecting any text on your page. You’ll see that you won’t be able to highlight anything, not even the images for that matter.


Thank you for visiting, for more tricks plz subscribe and like us on Facebook.

0 comments:

Post a Comment