How to Disable Mouse Selection Function on Blogger Java Script Widget

How to Disable Mouse Text Selection Function on Blogger Blogspot and WordPress Web Pages

Using the following java script you can Stop the Mouse Text Select option on your Website Pages. So that you can protect your website from Copy and paste option. You have to past this script on your website. For Blogger / WordPress, you can paste it in Gadget/Widget.

For Blogger Blogspot:

1. Log-in to Blogger Admin
2. Go to your blogger Dashboard -> Template -> Add a Gadget -> HTML/JavaScript
3. Paste the below code and save the Gadget.( No title Required)

Disable Mouse Text Selection in Blogger

Disable Mouse Selection On WordPress:

1. Log-in to WordPress Dashboard
2. Go to Appearance -> Widgets -> Add new Text Widget
3. Past one of the below code and save the Widget as shown below.

Disable WordPress Mouse Text Selection script

Script to Disable Mouse Selection:

<script type="text/javascript">//Disable mouse select // http://nxwiki.blogspot.com 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 thoughts on “How to Disable Mouse Selection Function on Blogger Java Script Widget

  1. Anonymous

    Thank you for the code! I was wondering if there was a way to disable mouse selection of text going up. The code blocks text selection going down but I can select the text going up. Thank you!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment moderation is enabled. Your comment may take some time to appear.