Last active
August 25, 2016 07:38
-
-
Save JaSpr/f710001b23835a5417a15f8030a09fe2 to your computer and use it in GitHub Desktop.
Turn on/off console.log with debug flag
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 consoleLog = window.console.log; | |
window.console.log = function() { | |
if (window.myDebugFlag) { | |
return consoleLog.apply(this, arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment