Thursday, November 3, 2011

SWEET!!!

So today I went onto the internet to check out the news and there was a crazy story! It was about how IKEA had displayed a family  photo without permission. This woman has a blog and posts pictures of her family like many people do. Apparently, there are stock photo companies, along with lots of other people I'm sure, who will go and steal your photos. Someone just happened to see the photo and recognized the family and alerted them. So I googled how to prevent people from being able to do this and found this awesome code:



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



So if you have a blog and don't want people to be able to steal your pictures, just copy this code. If you are on blogspot.com, just go into "design" and then "add a gadget" and select "Java script/HTML" and paste the code. Save your blog and Voila! people can no longer right-click on pictures in your blog and copy them. You can even test it out by going into your blog and trying to right-click on a photo. A message will pop up saying that it has been disabled.

I thought this was pretty cool and important, so I thought I would let anybody know who would like to keep their family photos, artwork, etc. safe.

P.S. I am still working on my Eiffel Tower window. I know, I know! It is taking me FOREVER! But I hope to be posting some pictures soon!