Home » Blogger Tutorials, Tricks and Hacks » Blogger Posts / Archive Tricks » How To Disable Mouse Selection In Blogger

Welcome to our AllBlogTools.com v.3 new version, We are still in beta, please contact us to report an error.

|| View All Tutorials ||

How To Disable Mouse Selection In Blogger

How To Disable Mouse Selection In Blogger

1 Star2 Stars3 Stars4 Stars5 Stars

Report Error

579 views

Here’s a nice and very useful trick that you can do to your blog to prevent or at least discourage anyone from easily copy-pasting any textual content from it. It’s a hack that disables the mouse cursor’s ability to select or highlight any element (particularly text) on the web page.

All it takes is adding one simple gadget in your Blogger blog. Just follow the instruction below:

  1. In your Blogger dashboard, head over to the ‘Design’ section
  2. Go to ‘Layout’ and then click on ‘Add a Gadget
  3. Scroll down and select ‘HTML/JavaScript’ from the gadget list
  4. Copy/Paste the following code inside the ‘Content’ box (don’t give it any title or name)
<script type="text/javascript">
/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
//form tags to omit in NS6+:
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>

 

5. Save the widget

    And that’s it! You have now reduced the possibility of having your blog’s content from being copied. View your blog and try it out yourself.

    Liked It ? Please Share

    Comments

    3 Responses | Post A Comment | Subscribe To Comments RSS Feed

    1. mahak says:

      doesn’t work

    2. Cess says:

      The code didn’t work. Tried to do it a couple of times but still don’t work.

    3. subbu says:

      no working

    Comments will be closed off on this post 365 days (1 year) after it is published. Apologies to this, but it's all about avoiding a growing comment spam problem. See our most recent posts where you can comment here