Subscribe:

Wednesday, June 22, 2011

Disable Right Click in Blogger Website

Disable Right Click in Blogger WebsiteHow to disable right click in blogger. This may not get attention of many people because for tis trick you need to have a blogger blog, and you should be the admin of that blog.

Now why will anyone want to disable the right click in blogger the first main reason which comes to anyone's mind is the content copying and the page source viewing well there are many another ways to view the source or copy content as you can see on my website I had also applied this script which disables the right click on website.
So the reason could be anything to apply this script but you should have some idea about the trick on disabling the right click, so just follow the below steps and you will get an brief idea about how its done.


Follow the below steps .:
1. Go to your dashboard in blogger.
2. Now click design and click on add gadget and choose HTMl/JavaScript from the menu.


 3. Now simply paste the below script into it and click save .:

<script type='text/javascript'>
<!--
//Disable right click script
//visit http://www.rainbow.arch.scriptmania.com/scripts/
var message="Sorry, right-click has been disabled";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")
// -->
</script>

4. That’s it now drag it anywhere into the page elements section as this will not be visible into the real website so now that’s done simply click view blog and hit right click to check if its really disabled.
This script can give some problem in Internet Explorer but working fine in Firefox and Chrome.

0 comments:

Post a Comment