This article explains to you how to disable Right Click+Selecting+Printing functions in one code.If you like to add these feature to your website/blog,then follow the steps below.
1.Login to your blogger dashboard--> layout- -> Edit HTML
2.Scroll down to where you see </head> tag .
3.Copy below code and paste it just before the </head> tag .
<script language='JavaScript1.2'>
//Disable Select Text script (IE4+, NS6+) - By all4blogs
//For full source code, visit http://all4blogs.blogspot.com
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>
<script language='JavaScript'>curPage=1;
document.oncontextmenu = function(){return false}
if(document.layers) {
window.captureEvents(Event.MOUSEDOWN);
window.onmousedown = function(e){
if(e.target==document)return false;
}
}
else {
document.onmousedown = function(){return false}
}
</script>
4.Now save your template and you are done.
2 commentaires:
not working for me :(
Try again the new code!!
Post a Comment