RSS Posts
RSS Comments
Space For Sell
codes HTML
If you want to protect your images or pictures you can use simple JAVA SCRIPT. When your visitors want to save the image from your blog or site by clicking right click of mouse there will be a pop up warning window for the visitors which tell them "No right click" or "This website is copyrighted" or you can use want you want.

But sometimes your visitor may confuse that this site is harmful or not it will depend on your site's structures. However is it a v ery simple way to remind your visitors that they cant to use this images for other purposes.


You may use following code

// No rightclick script for IE1. This following scripts prevents the use of the right mouse click, help protect images and code from unwanted "borrowing". Both scripts do the same thing and work in all browsers).


function click()
{
if (event.button==2)
{
alert('Copyright © bloggerwalk.blogspot.com');
}
}
document.onmousedown=click

// No rightclick script for Netscape
if (navigator.appName.indexOf("Netscape") != -1){
window.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
window.onmousedown=rightclick;
window.onmouseup=rightclick;
function rightclick(e) {
if (e.which == 3) {
alert('Copyright © night1gale.com')
return false;
}
else {
return true;
}
}
}
Or you can use the following code in your java script
<!-- Begin
function right(e) {
var msg = "Copyright © bloggerwalk.blogspot.com";
if (navigator.appName == 'Netscape' && e.which == 3) {
alert(msg);
return false;
}
else
if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2) {
alert(msg);
return false;
}
return true;
}
document.onmousedown = right;
// End -->

Installation:
You can include these code in your active java script at the end or existing script of you can make a separate script. In case of seperate JS you can use your note pad and save the file as "imageportect.js" or you can name the script as you want.
Now, in your content index file (HTML,PHP ect), you will locate your java file. So find the code below
</head>

Replace the code with the folowing code
<script src="Locationofyourjavafile/imageportect.js" type="text/javascript"></script>
</head>

check your src="Locationofyourjavafile" for correct address
Related Posts Plugin for WordPress, Blogger...