Finally One more Trick s Ready for you, Today here you will Learn How to prevent bad people from stealing your blog content.
Disable Right on your whole Blog
<script language=”JavaScript”>
<!–
//Disable right click script by https://www.onlyloudest.com/
var message=””;
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function(“return false”)
// –>
</script>
Disable Right click on all Images
<script type=”text/javascript”>
//<![CDATA[
function nocontext(e) {
var clickedTag = (e==null) ? event.srcElement.tagName : e.target.tagName;
if (clickedTag == “IMG”) {
alert(alertMsg);
return false;
}
}
var alertMsg = “Image context menu is disabled”;
document.oncontextmenu = nocontext;
//]]>
</script>
1 comment
Hi Sanu,
This is fine for some Bloggers, they can edit their html files. But for other user like WordPress. This trick will not work. Although I am also using one my blog on Blogger. I will give this try on it.
Thank for sharing
Comments are closed.