Created
April 20, 2017 08:37
-
-
Save sunmughan/e20b6bb297279e4b24dfe7ac4dbc5da0 to your computer and use it in GitHub Desktop.
Disable Copy Paste Script For Blogger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- www.droidadda.org Start disable copy paste --> | |
<script type='text/javascript'> | |
var isCtrl = false; | |
document.onkeyup=function(e) | |
{ | |
if(e.which == 17) | |
isCtrl=false; | |
} | |
document.onkeydown=function(e) | |
{ | |
if(e.which == 17) | |
isCtrl=true; | |
if((e.which == 85) || (e.which == 67) && isCtrl == true) | |
{ | |
// alert(‘Keyboard shortcuts are cool!’); | |
return false; | |
} | |
} | |
var isNS = (navigator.appName == "Netscape") ? 1 : 0; | |
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP); | |
function mischandler(){ | |
return false; | |
} | |
function mousehandler(e){ | |
var myevent = (isNS) ? e : event; | |
var eventbutton = (isNS) ? myevent.which : myevent.button; | |
if((eventbutton==2)||(eventbutton==3)) return false; | |
} | |
document.oncontextmenu = mischandler; | |
document.onmousedown = mousehandler; | |
document.onmouseup = mousehandler; | |
</script> | |
<!-- www.droidadda.org end disable copy paste --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment