Hi guys,
I tried the above mentioned code snippet in my website and worked like a charm, adding as suggested, the <script> & </script> tags.
Our website is www.geopsis.com
The specific blog page we wanted to disable select text is this: https://www.geopsis.com/news-blog
In effect, the code helped discouraging potential copying and pasting of parts or all of our articles, which is the point of this whole thread. Replying to Paul above, naturally if one is determined to take an hour and write in a blank document what they see and read, nobody can prevent them. However most of the illegal copying and pasting on the internet -thus depriving you of the real credits of your work, which is traffic at your site and your article-, happens because people can simply copy and paste what they see.
To make things easier, here is the code snippet complete with the tags:
<script>
function disableselect(e) {
return false;
}
function reEnable() {
return true;
}
document.onselectstart = new Function("return false");
if (window.sidebar) {
document.onmousedown = disableselect;
document.onclick = reEnable;
}
</script>
Additionally, let me add that if one really wants to copy your content, then they might as will try and print the page in .pdf format from Chrome / other browsers. For the moment I haven't found any code to disable print from web browser, but I will update this post if I do.