Simple Tricks To Protect Your Content Using Javascript

by SEO Consultant

Your Blog Content is Your Gold. So keep protect it from stolens.

There is some lazy Blogger (Read: Thief) that always copying and pasting our Blog content without permissions.

This tricks not 100% protect your Blog, but its will make your Blog to difficult to copyings.

How its work?

Simple, this javascript snippets will disable users to selected or block the text on entire body post.

The Javascript code please?

this is the javascript code snippets

01.<script type="text/javascript"><!--
02.function disableSelection(target){
03.if (typeof target.onselectstart!="undefined") //IE route
04.target.onselectstart=function(){return false}
05.else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
06.target.style.MozUserSelect="none"
07.else //All other route (ie: Opera)
08.target.onmousedown=function(){return false}
09.target.style.cursor = "default"
10.}
11.disableSelection(document.body)
12.// -->
13.
14.</script>

Where I have put that javascript code?

just put the javascript code right before <body> tag on your themes templates.

Leave a Comment

Previous post:

Next post: