Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function nope(){
- this.n = 0;
- this.devtools = e =>{}
- this.whoops = () =>{
- alert("que procd?");
- }
- this.devtools.toString = e=>{
- this.opened = true;
- this.n += 1;
- if (this.n > 1) {
- this.whoops();
- }
- }
- this.documentListener = () => {
- window.onkeydown = e => {
- e.preventDefault();
- e.stopPropagation();
- if (e.keyCode == 123) {
- alert("woops")
- }
- if (e.ctrlKey && e.shiftKey && e.keyCode == 73) {
- this.whoops();
- }
- }
- }
- this.context = () =>{
- document.addEventListener("contextmenu", function (e) {
- e.preventDefault();
- e.stopPropagation();
- this.whoops();
- }, false);
- }
- this.resize = () =>{
- window.onresize = e=> {
- e.preventDefault();
- e.stopPropagation();
- this.whoops();
- };
- }
- this.init = ()=>{
- // esta abierta la pvta consola?
- console.log('%c', this.devtools);
- // intenta abrir consola f12 o inspector de elementos
- this.documentListener();
- // intenta abrir menu con click derecho
- this.context();
- // de algun modo se colo?
- this.resize();
- }
- this.init();
- }
- //aqui iniciamos
- nope();
- // en otros documentos puedes hacer
- if(typeof nope !== "function"){
- // no cargo la funcion
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement