Created
March 12, 2014 10:11
-
-
Save akshatmittal/9504158 to your computer and use it in GitHub Desktop.
Console Disable JS
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 () { | |
var _z = console; | |
Object.defineProperty(window, "console", { | |
get: function () { | |
if (_z._commandLineAPI) { | |
throw undefined; | |
} | |
return _z; | |
}, | |
set: function (val) { | |
_z = val; | |
} | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment