Sunday, July 21, 2013

How to Disable Mouse Selection On Your Blog?

I found this amazing trick then i decided to share this trick with my friends by posting it on my blog.
It will disable Mouse selection on your blog.For Protecting your blog from copyright the easiest way is to disable mouse selection on your blog by which no one can copy text and images, we can make it possible by using small JavaScript code which will disable mouse selection on blog.

Java script Code For disabling mouse selection:

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

For blogger

1.Go to blogger dashboard
2.Click on Template tab.
3.Now Add Gadget >> HTML/JavaScript
4.Paste JavaScript code there which I provided above.
5.After pasting code click on Save button and say bye to content thief.

For WordPress

1. Go to Wordpress dashboard
2. Now click on Appearance >> Widgets >> Add New Text Widget
3.Paste JavaScript code there which I provided above
4.After pasting code click on Save button and say bye to content thief.
Like the Post? Please share it with your Friends.

No comments:

Post a Comment

Warning !

Search This Blog