-
-
Save felipepodesta/2d140a503f3b57e8be07b28f5ecb6196 to your computer and use it in GitHub Desktop.
Console Busting along with Console disabling for production environments
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
var DEBUG_MODE = true; // Set this value to false for production | |
if(typeof(console) === 'undefined') { | |
console = {} | |
} | |
if(!DEBUG_MODE || typeof(console.log) === 'undefined') { | |
// FYI: Firebug might get cranky... | |
console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment