Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function nope(){
  2.   this.n = 0;
  3.   this.devtools = e =>{}
  4.   this.whoops = () =>{
  5.     alert("que procd?");
  6.   }
  7.   this.devtools.toString = e=>{
  8.     this.opened = true;
  9.     this.n += 1;
  10.     if (this.n > 1) {
  11.       this.whoops();
  12.     }
  13.   }
  14.   this.documentListener = () => {
  15.     window.onkeydown = e => {
  16.       e.preventDefault();
  17.       e.stopPropagation();
  18.       if (e.keyCode == 123) {
  19.         alert("woops")
  20.       }
  21.       if (e.ctrlKey && e.shiftKey && e.keyCode == 73) {        
  22.         this.whoops();
  23.       }
  24.     }
  25.   }
  26.   this.context = () =>{
  27.     document.addEventListener("contextmenu", function (e) {
  28.        e.preventDefault();
  29.        e.stopPropagation();
  30.        this.whoops();
  31.     }, false);
  32.   }
  33.   this.resize = () =>{
  34.     window.onresize = e=> {
  35.       e.preventDefault();
  36.       e.stopPropagation();
  37.       this.whoops();
  38.     };
  39.   }
  40.   this.init = ()=>{
  41.     // esta abierta la pvta consola?
  42.     console.log('%c', this.devtools);
  43.     // intenta abrir consola f12 o inspector de elementos
  44.     this.documentListener();
  45.     // intenta abrir menu con click derecho
  46.     this.context();
  47.     // de algun modo se colo?
  48.     this.resize();
  49.   }
  50.   this.init();
  51. }
  52.  
  53. //aqui iniciamos
  54. nope();
  55. // en otros documentos puedes hacer
  56. if(typeof nope !== "function"){
  57. // no cargo la funcion
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement