Designed by Veethemes.com

How To Disable Mouse Selection On Blogger And WordPress



For Protecting our 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.

JavaScript 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



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


For WordPress



  • Go to Wordpress dashboard
  • Now click on Appearance >> Widgets >> Add New Text Widget
  • Paste JavaScript code there which I provided above.
  • After pasting code click on Save button and say bye to content thief.


With this trick we can disable mouse selection in both blogger and WordPress, This trick is working on all major browser which support JavaScript.

Updates and Important Note 


1. Don’t use this script on a website where you are providing any type of codes .
2. Now peoples can make use of your blog’s feed to copy content . So keep your blog RSS feeds as small as you can . 
3. You can Also disable this script on specific posts or pages by adding Following Type of Piece of code in your blogger template :-


<b:if cond=’data:blog.url != “Specific Page or Post URL”‘>
Anti Copy Paste Script Code Here
</b:if>