Give Feedback
HomeTechnologyInternet

How you can Prevent Blog Posts From Being Copied

geekblogger

By geekblogger

7 weeks ago

RSS Feed
Prevent Blog Posts From Being Copied

Now Prevent your Blog Posts From Being Copied is very easy with just adding simple JavaScript Code to your blog, this will not prevent user from right clicking the mouse button, but this will restrict user from selecting text from your page. Hence user cannot copy text without selecting text !!.
 
Steps to add this JavaScript code in your website or blog is:

Navigate to the Layout > Page Element > Add a Gadget > click on HTML/Javascript and paste the JavaScript code given below.
<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>
Thats it!, Now try to select the text :-)

Subscribe to commentsExpand all commentsRSS Subscribe to comments
Comments (0)