-
-
Save arunkumartdr/55097a224a221a012b5d5d05c7dc97fe to your computer and use it in GitHub Desktop.
Pause Debugger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tryCount = 0; | |
var minimalUserResponseInMiliseconds = 200; | |
function check() { | |
before = new Date().getTime(); | |
after = new Date().getTime(); | |
if (after - before > minimalUserResponseInMiliseconds) { | |
debugger; | |
//window.location.replace("http://www.google.co.in"); | |
self.location.replace(window.location.protocol + window.location.href.substring(window.location.protocol.length)); | |
} | |
else { | |
debugger; | |
//window.location.replace("http://www.google.co.in"); | |
before = null; | |
after = null; | |
delete before; | |
delete after; | |
} | |
setTimeout(check, 100); | |
} | |
check(); | |
window.onload = function() { | |
document.addEventListener("contextmenu", function(e) { | |
e.preventDefault(); | |
}, false); | |
document.addEventListener("keydown", function(e) { //document.onkeydown = function(e) {// "I" key | |
if (e.ctrlKey && e.shiftKey && e.keyCode == 73) { | |
disabledEvent(e); | |
} // "J" key | |
if (e.ctrlKey && e.shiftKey && e.keyCode == 74) { | |
disabledEvent(e); | |
} // "S" key + macOS | |
if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) { | |
disabledEvent(e); | |
} // "U" key | |
if (e.ctrlKey && e.keyCode == 85) { | |
disabledEvent(e); | |
} // "F12" key | |
if (event.keyCode == 123) { | |
disabledEvent(e); | |
} | |
}, false); | |
function disabledEvent(e) { | |
if (e.stopPropagation) { | |
e.stopPropagation(); | |
} else if (window.event) { | |
window.event.cancelBubble = true; | |
} | |
e.preventDefault(); | |
return false; | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var tryCount = 0;var minimalUserResponseInMiliseconds = 200;function check() {before = new Date().getTime();debugger;after = new Date().getTime();if (after - before > minimalUserResponseInMiliseconds) {document.write(" Alert!! Close Developer Tools Now... ");self.location.replace(window.location.protocol + window.location.href.substring(window.location.protocol.length));}else{before = null;after = null;delete before;delete after;}setTimeout(check, 100);}check();window.onload = function() {document.addEventListener("contextmenu", function(e){e.preventDefault();}, false);document.addEventListener("keydown", function(e) {//document.onkeydown = function(e) {// "I" key | |
if (e.ctrlKey && e.shiftKey && e.keyCode == 73) {disabledEvent(e);}// "J" key | |
if (e.ctrlKey && e.shiftKey && e.keyCode == 74) {disabledEvent(e);}// "S" key + macOS | |
if (e.keyCode == 83 && (navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey)) {disabledEvent(e);}// "U" key | |
if (e.ctrlKey && e.keyCode == 85) {disabledEvent(e);}// "F12" key | |
if (event.keyCode == 123) {disabledEvent(e);}}, false);function disabledEvent(e){if (e.stopPropagation){e.stopPropagation();} else if (window.event){window.event.cancelBubble = true;}e.preventDefault();return false;}}; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment