Showing posts with label right. Show all posts
Showing posts with label right. Show all posts
Saturday, February 25, 2017
How to Disable Right Click On Blogger For Images
How to Disable Right Click On Blogger For Images

1. Log in to Blogger And Go to Dashboard > Layout
2. Click Add Gadget And Select HTML/Javascript
3. Copy Paste Below Code.
<script language="JavaScript1.2">Note: You Can Copy This Code From This Link.
var clickmessage="Right click disabled on images!"
function disableclick(e) {
if (document.all) {
if (event.button==2||event.button==3) {
if (event.srcElement.tagName=="IMG"){
alert(clickmessage);
return false;
}
}
}
else if (document.layers) {
if (e.which == 3) {
alert(clickmessage);
return false;
}
}
else if (document.getElementById){
if (e.which==3&&e.target.tagName=="IMG"){
alert(clickmessage)
return false
}
}
}
function associateimages(){
for(i=0;i<document.images.length;i++)
document.images[i].onmousedown=disableclick;
}
if (document.all)
document.onmousedown=disableclick
else if (document.getElementById)
document.onmouseup=disableclick
else if (document.layers)
associateimages()
</script>
4. Now Click On Save Button, You Are Done.
Available link for download
Subscribe to:
Posts (Atom)