Created
March 6, 2014 17:24
-
-
Save yungookim/9394810 to your computer and use it in GitHub Desktop.
Disable user's Javascript execution from console
This file contains hidden or 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
(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 netflix.com"; | |
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
Source code from here