Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable javascript console
(function() {
try {
var $_console$$ = console;
Object.defineProperty(window, "console", {
get: function() {
if ($_console$$._commandLineAPI)
throw "Sorry, for security reasons, the script console is deactivated on this website";
return $_console$$
},
set: function($val$$) {
$_console$$ = $val$$
}
})
} catch ($ignore$$) {
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment