Skip to content

Instantly share code, notes, and snippets.

@milankorsos
Created November 24, 2011 16:05
Show Gist options
  • Save milankorsos/1391691 to your computer and use it in GitHub Desktop.
Save milankorsos/1391691 to your computer and use it in GitHub Desktop.
define cookie controlled custom outputs for your modules
//Use $.cookie('quickbrowse-debug', true, {expires: 7, path: '/'}) to set.
// ... and $.cookie('quickbrowse-debug', null) to delete.
var qbConsole;
if(!$.cookie('quickbrowse-debug')) {
qbConsole = {};
qbConsole.log = function(){};
} else {
qbConsole = console;
}
//usage
qbConsole.log('debug msg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment