Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2023
11
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | Source Code | 0 0
  1. <script type="text/javascript">
  2. /***********************************************
  3. * Disable Text Selection script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
  4. * This notice MUST stay intact for legal use
  5. * Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
  6. * Re-share at http://panduanbloggers.blogspot.com/
  7. ***********************************************/
  8. function disableSelection(target){
  9. if (typeof target.onselectstart!="undefined") //IE route
  10. target.onselectstart=function(){return false}
  11. else if (typeof target.style.MozUserSelect!="undefined") //Firefox route
  12. target.style.MozUserSelect="none"
  13. else //All other route (ie: Opera)
  14. target.onmousedown=function(){return false}
  15. target.style.cursor = "default"
  16. }
  17. disableSelection(document.body)
  18. </script>
  19.  
  20. <script language=javascript>
  21. function clickIE4(){
  22. if (event.button==2){
  23. return false;
  24. }
  25. }
  26. function clickNS4(e){
  27. if (document.layers||document.getElementById&&!document.all){
  28. if (e.which==2||e.which==3){
  29. return false;
  30. }
  31. }
  32. }
  33. if (document.layers){
  34. document.captureEvents(Event.MOUSEDOWN);
  35. document.onmousedown=clickNS4;
  36. }
  37. else if (document.all&&!document.getElementById){
  38. document.onmousedown=clickIE4;
  39. }
  40. document.oncontextmenu=new Function("return false")
  41. </script>
  42.  
  43.  
  44. c. arahkan kursur didalam kode HTML, tekan CTRL+F, copykan kode berikut:
  45. ]]></b:skin> atau </style>
  46. d. masukan kode di bawah ini di atas kode ]]></b:skin>
  47.  
  48.  
  49. .post-outer {
  50. -webkit-touch-callout:none;
  51. -webkit-user-select:none;
  52. -khtml-user-select:none;
  53. -ms-user-select:none;
  54. -moz-user-select:none;
  55. }
  56.  
  57. .post blockquote,.post pre,.post code{
  58. -webkit-touch-callout:text;
  59. -webkit-user-select:text;
  60. -khtml-user-select:text;
  61. -ms-user-select:text;
  62. -moz-user-select:text;
  63. }
  64.  
Tags: risec1337
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement