How to Disable Set As Background Desktop in a Picture
When you right-click on an image saved on your computer or online, you are presented with a variety of options from which to choose. One of those options is to set the pictures as a desktop background. If you display your artwork online, you might not appreciate other people using your images as their desktop backgrounds. If you want to prevent them from doing so, you can disable their ability to set a picture as a desktop background by implementing a code into your Web page that disables their right-click.
Instructions
-
-
1
Open the Web page for which you want to disable the "Set as Desktop Background" option. A word processing program such as Notepad works fine.
-
2
Copy and paste the following code into the head tag of your document:
<SCRIPT language="JavaScript">
<!--
var message="Thank you for visiting my site.";
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// -->
</SCRIPT> -
-
3
Save the Web page. The "Set as Desktop Background" option is now disabled.
-
1
Tips & Warnings
The head tags appear as follows: <head> and </head>. Place your code between these two tags.
There is no way to completely guarantee that users can’t copy your pictures from the Internet. They can still use the Print Screen function to copy the Web page and all images are cached in their Temporary Internet Files once they visit your Web page. This process simply makes it more difficult for them to do so.
References
- Photo Credit Comstock Images/Comstock/Getty Images