Skip to content

Instantly share code, notes, and snippets.

@milankorsos
Created November 24, 2011 16:05
Embed
What would you like to do?
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