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...