Blogger Blog Security: Disable Right Click, Disable Text Selection

crop faceless programmer working on laptop in studio

All of us, into blogging or engaged in online activities, at some time or the other has faced the issue of our images and own articles being copied to other sites without our permission. This causes annoying to no doubt. So you can at least take steps to minimize it, because we can’t entirely prevent it. Here are some simple ways by which you can protect your blogger blog from plagiarism and from your images being copied away, thus affecting your precious bandwidth.

Read more: Bing Toolbar and Search Box for Blog »

Just keep these two codes in your website. They will ensure 80% less stealing of your content. Replace the singlequote in red below by a single quote.

Disable Right Click Code

var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
return false;
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;

Disable Text Selection Code

<script type="text/javascript">
//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]
function disableselect(e){
if (omitformtags.indexOf(
return false
function reEnable(){
return true
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
Disable Text Selection and Right Click Code
Disable Text Selection and Right Click Code

Author: Rahul Bhattacharya

Rahul is a journalist with expertise in researching a variety of topics and writing engaging contents. He is also a data analyst and an expert in visualizing business scenarios using data science. Rahul is skilled in a number of programming languages and data analysis tools. When he is not busy writing, Rahul can be found somewhere in the Appalachian trails or in an ethnic restaurant in Chicago.

1 thought on “Blogger Blog Security: Disable Right Click, Disable Text Selection

Leave a Reply