05 February 2009

How to Disable Right click in Blogger / Blogspot ?



Have you noticed, that some web sites do not allow their visitors using right mouse click while pointer is on the blog area. This option is useful for the site and blog owners, who want to minimize the possibilities of the content direct copying to other posts.






Right click on any internet browser is very important element and we must use it when it comes to copy or editing texts and etc. It’s very important when it comes to webmasters too. but some people may use it in a bad way, and you may want to make click right disabled on your blog. to protect you text, images links and etc.


To setup this tool in your blog Copy the Following code and paste it to your blog by adding a new page element.

Step 1 : Go to Dashboard > Layout > Add Gadget > HTML / JavaScript
Step 2 : Copy the following code and paste it there .



<script language="JavaScript">
<!--

//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com

var message="Function Disabled!";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// -->
</script>



Step 3 : Save the html/javascript and view you blog.

When you will try to do right click, a message will tell you that “Function disabled” , and if you want to change this words” Function Disabled” Then simply find it in code and replace it.

Don't forget to drop you comment here.



Bookmark this post:
StumpleUpon Ma.gnolia DiggIt! Del.icio.us Blinklist Yahoo Furl Technorati Simpy Spurl Reddit Google

53 comments:

xalki on February 06, 2009 said...

First of all congratulations for your clear language in your posts and for the useful blogger tips

Regarding this post, I am afraid doing any changes in my blog because of the fear of google penalty. Have you tested this method without page rank problems?

√ДMPIRE on February 06, 2009 said...

@ Xalki

I have tested it.... You can use it without any problem dude

Kaushik on February 13, 2009 said...

Superb post dude..
Can you give me the link to the post which you have posted to get the continue reading thing ?

Mohamad Fauzi Taslim on February 14, 2009 said...

better than best

√ДMPIRE on February 15, 2009 said...

@ Mohamad Fauzi Taslim

Thanks for comment dude

@ kaushik

will send u the link dude

Anonymous said...

this is really great

orange on March 22, 2009 said...

Thanxxxx Thumbs up!!

sagor139 on March 29, 2009 said...

good

vishal.gaikar on March 29, 2009 said...

Thanks for your valuable comments friends :)

Vimalkumar C S on April 01, 2009 said...

Thanks for providing this valuable code

Kimme Utsi on May 02, 2009 said...

This was an useful post, and easy to install as it was just adding an gadget.

Anonymous said...

thank you!

webcamscandals.com on May 03, 2009 said...

very very thanks for your best tip but text selecting with mouse courser and press ctrl+c for copy and ctrl+v for paste is become copy and paste this is negitive for copy protectect.

Charm on May 12, 2009 said...

great!!! thanks!!!

√ДMPIRE on May 12, 2009 said...

@ Charm

U R Welcome dude

Rotten on June 12, 2009 said...

I followed the directions and added it to my blog but if you right click over an image, it says "function disabled" and then it takes you to another page with the image only displayed and you can right click the image. Did I miss something?

anand on June 28, 2009 said...

Is there any way of disabling the right click without any message like "function disabled" being popped up?? If there is then please let me know

√ДMPIRE on June 29, 2009 said...

Yeah dude

just remove

var message="Function Disabled!";

this line from code

Christyrenee on July 20, 2009 said...

Thank you, thank you, thank you!!!!!

Vishal on July 20, 2009 said...

@ Christyrenee

U R Welcome dear

Pacey said...

Thanks, it worked for me...

000_Nandhavanam_000 on July 30, 2009 said...

Thanks dude.. it works great >:D<

Anonymous said...

It's great! Thanks Dude.

Different Man on August 04, 2009 said...

that was very nice man..Thanks.U r great.

Daiquiri on August 07, 2009 said...

THANK YOU! As a photographer, I was having a hard time with clients lifting photos. Love that I could do this as a gadget instead of combing through the larger chunk of code to modify. Thanks again!!

√ДMPIRE on August 07, 2009 said...

thanks for your comments friends :)

BILJO ISSAC on August 11, 2009 said...

how can i disable ctrl+c function???


http://upsc-questions.blogspot.com/

MinorityReport on August 13, 2009 said...

THANK YOU!

TheSexydime's on August 14, 2009 said...

thank you!!!!!!!!!!!

palateaffair on August 31, 2009 said...

If you clik on the picture/photo..it opens in other window. Then the code doesn't works!
Any other way?

PTC Investigations on September 12, 2009 said...

Thanks your code worked like a charm. Can't believe some people...

And about the photo opening up in another window. You need to remove the link from the code of each picture. I know blogger automatically puts a link to every picture so it can open up in a another window. Just take out the like and leave the image part. If you know what I am talking about...Take out the href part.

Wish I could find a way to blog Ctrl+C though...any suggestions?

√ДMPIRE on September 13, 2009 said...

Thanks for the comments friends....

@ PTC Investigation

I will send you the solution on your mail

Christina on October 09, 2009 said...

Ok, so... I did this and it worked. But when you click the image to be larger, it will let me copy it. I have no idea what I'm doing. :/

sHaRoN on October 10, 2009 said...

thx^^

√ДMPIRE on October 11, 2009 said...

@ Sharon

U R Welcome dude

Hayley on October 16, 2009 said...

Thanks so so much! As a photographer this is SUCH an important feature!!

kubleo on October 24, 2009 said...

IT WORKS!!! I have been looking for something like this for a while thanks mate!!! !) :)

√ДMPIRE on October 30, 2009 said...

@ Hayley

Yeah it's true, Photographers need to protect their work from content stealer s....I am glad that it works for u :)

@ kubleo

U R Most welcome dude

Sheryl Salisbury on November 08, 2009 said...

Just wanted to say thank you very much! Your directions were clear and accurate, much appreciated. I'm using the html code on my photography blog. www.sherylsalisburyphotography.blogspot.com
Thanks again!

USANA.KT Admin on November 08, 2009 said...

thnx very much...but after I try this trick, they can copy 'ctrl C'....then I try other trick, it's was working.....bytwy, thnx

Sonja Wright on November 12, 2009 said...

OMG, thank you for giving such clear, easy to understand directions. It works but now I have the entire code on my sidebar...where can I add this gadget so it does not show up on my page?
Also, if you happen to know the answer to this, when I left click it takes you to my photobucket account where I downloaded the photo from.. Any help would be appreciated. Thanks again, you are awesome!!

Sonja Wright on November 12, 2009 said...

Tried it again and everything works perfect now!! Thanks again, you are awesome!!

Sonja Wright on November 12, 2009 said...

Nope, you can still left click and get into my photobucket account...

hitchmicblogspot on November 26, 2009 said...

Fantastic code

Anonymous said...

People! DON'T DO THIS!!!

If someone wants to steal stuff from your site this won't slow them down for a second. If you want to stop them this is definitely not the way to go.

People who visit your site to steal content are in the minority.

What you will accomplish is REALLY annoying the majority of your readers.

This kind of code also screws up more stuff then you might realize.

And, again, it does nothing to protect your content it just annoys your legitimate viewers. NOTHING! BAD BLOGGERS! DON'T DO THIS!

WaNie Da Po0H on December 01, 2009 said...

thanx.. it works.. ;p

ShaJah on December 05, 2009 said...

tq

Justin on December 07, 2009 said...

Thanx Bro!

Everyone please check out my blog if you like new music. http://straightpiff.blogspot.com

i'd really appreciate it!

Ran Ningkun on December 21, 2009 said...

Thank you!!! Thank you!!! :)

Vishal Singh on December 24, 2009 said...

Gr8.....working......
script.....thank u........

~RedS!z in tH€ hOus€~ xoxo on December 25, 2009 said...

tq so much

Amri HMS on January 01, 2010 said...

Thanks, its really work and simple.........

Reinis Melioranskis on January 03, 2010 said...

G8 thanks! :)

Post a Comment

If you like ma post , please pass your comments here :)

 

© All Content is Under Copyright Protection © 2008-2009 World of Vampire Site Best Viewed in Firefox : VISHAL