How to disable right click in your blog/website site ?

­

Many of you have seen that in many blogs right click is disabled. Users cannot copy any pictures or can’t view source code of that page.If you want to disable right click in your blog too and want to protect any pictures or anything else from the misused or being copied. Then,follow the following steps:-

1. First sign in blogger.com.

• Go to design

• Go to Edit Html

2. Find the given tag (press ctrl + F to open the find box and copy the code to find box for quick finding)
<head>

3. Now copy the given code and paste the code before <head> tag.

4. Save and template,view your blog and try to right click in your blog.You will see this kind of image.

<script type=”text/javascript”>
/* <![CDATA[ */
function clickExplorer() {
if( document.all ) {
alert(‘Right click disabled.’);
}
return false;
}

function clickOther(e) {
if( document.layers || ( document.getElementById && !document.all ) ) {
if ( e.which == 2 || e.which == 3 ) {
alert(‘Right click disabled.’);
return false;
}
}
}
if( document.layers ) {
document.captureEvents( Event.MOUSEDOWN );
document.onmousedown=clickOther;
}
else {
document.onmouseup = clickOther;
document.oncontextmenu = clickExplorer;
} /* ]]> */
/* <![CDATA[ */ window.addEvent(‘domready’, function() {

document.body.oncopy = function() {
alert(‘Right click disabled.’);
return false; } });
if( typeof( document.onselectstart ) != ‘undefined’ )
document.onselectstart = function(){ return false };
document.ondragstart = function(){ return false } /* ]]> */
</script>

Don’t forget to comment…………….

You may also like...

5 Responses

  1. tonyknuckles says:

    This doesn't work on non-IE browsers

  2. sabin says:

    @tonynuckles
    IT defnitely works.I don't know which version of IE browsers you are taking about but as far as i know Every version of IE browsers it works.Try opening this blog on IE browser and try to right click…………You can't ……….

  3. Anonymous says:

    thank you so much for this Post.

  4. Sp says:

    How to remove footer part of the custom templates

Leave a Reply

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