how to disable copy and paste on blogger how to disable right click on blogger without message how to disable right click on blogger for pictures.
how to disable right click on blogger for pictures ?
Add this before closing head </head>
<script type="text/javascript">
//<![CDATA[
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Disable context menu on images by (Theonlineking.com)
Version 1.0
You are free to copy and share this code but please do not remove this credit notice.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
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>
how to disable right click copy and paste on blogger
Go to layout add widgets insert HTML/JavaScript and paste the following code
<!-- START Theonlineking.com disable copy paste-->
<script src='demo-to-prevent-copy-paste-on-blogger_files/googleapis.js'>
</script>
<script type='text/javascript'>
if (typeof document.onselectstart!="undefined" ) { document.onselectstart=new Function ("return false" ); } else{
document.onmousedown=new Function ("return false" ); document.onmouseup=new Function ("return true" ); } </script>
<!-- END Theonlineking.com disable copy paste-->
also try this code
<script type="text/javascript">
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
Ask a Question:
You must be logged in to post a comment.