Skip to content

Instantly share code, notes, and snippets.

@logeshpaul
Created March 30, 2012 09:21
Show Gist options
  • Save logeshpaul/2250257 to your computer and use it in GitHub Desktop.
Save logeshpaul/2250257 to your computer and use it in GitHub Desktop.
Js: Remove debugging codes (console.*)
<!-- include firebugx only in prod in case console.* got forgotten -->
<script type="text/javascript">
var names = ["log","debug","info","warn","error","assert","dir","dirxml","group","groupEnd","time","timeEnd","count","trace","profile","profileEnd"];
window.console={};
for(var i=0;i<names.length;++i)window.console[names[i]]=function(){}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment