Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Disable Copy Paste -->
- <script>
- function check(e){
- alert(e.keyCode);
- }
- document.onkeydown = function(e) {
- if (e.ctrlKey && (e.keyCode === 67 || e.keyCode === 86 || e.keyCode === 85 || e.keyCode === 117)) {
- //Alt+c, Alt+v will also be disabled sadly.
- alert("Sorry you can't copy and paste in here");
- }
- return false;
- };
- </script>
- <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>
Advertisement
Add Comment
Please, Sign In to add comment