Advertisement
shakil97bd

STOP copy-paste from your website

Mar 3rd, 2015
488
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. ***************************** STOP copy-paste from your website ***********************************
  2.  
  3. //paste this code in your theme's header.php file before header closing tag </header>.
  4.  
  5.  
  6. Code 1
  7. ==============
  8.  
  9. <script type="text/javascript">
  10. /******************************************************************************
  11. *** COPY PROTECTED BY CHETANGOLE.COM/BLOG/WP-COPYPROTECT version 2.2.0 ****
  12. ******************************************************************************/
  13. function clickIE4(){
  14. if (event.button==2){
  15. return false;
  16. }
  17. }
  18. function clickNS4(e){
  19. if (document.layers||document.getElementById&&!document.all){
  20. if (e.which==2||e.which==3){
  21. return false;
  22. }
  23. }
  24. }
  25.  
  26. if (document.layers){
  27. document.captureEvents(Event.MOUSEDOWN);
  28. document.onmousedown=clickNS4;
  29. }
  30. else if (document.all&&!document.getElementById){
  31. document.onmousedown=clickIE4;
  32. }
  33.  
  34. document.oncontextmenu=new Function("return false")
  35. // -->
  36. </script>
  37.  
  38. <script type="text/javascript">
  39.  
  40. function disableSelection(target){
  41. if (typeof target.onselectstart!="undefined") //For IE
  42. target.onselectstart=function(){return false}
  43. else if (typeof target.style.MozUserSelect!="undefined") //For Firefox
  44. target.style.MozUserSelect="none"
  45. else //All other route (For Opera)
  46. target.onmousedown=function(){return false}
  47. target.style.cursor = "default"
  48. }
  49. </script>
  50.  
  51.  
  52.  
  53. * Note: using this code you can disable mouse right click and keyboard shortcuts copy system.
  54.  
  55.  
  56. *****************************************************************************
  57.  
  58. //This this another code for stop copy-paste from you website
  59.  
  60. Code 2
  61. ==============
  62.  
  63. <script type=”text/JavaScript”>
  64. //courtesy of hostcoding.com
  65. function killCopy(e){
  66. return false
  67. }
  68. function reEnable(){
  69. return true
  70. }
  71. document.onselectstart=new Function (“return false”)
  72. if (window.sidebar){
  73. document.onmousedown=killCopy
  74. document.onclick=reEnable
  75. }
  76. </script>
  77.  
  78.  
  79.  
  80. ********** Thanks **********
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement