Skip to content

Instantly share code, notes, and snippets.

@erichoco
Last active June 16, 2016 03:19
Show Gist options
  • Save erichoco/db82e041a21a557bb220cdfb0887bb42 to your computer and use it in GitHub Desktop.
Save erichoco/db82e041a21a557bb220cdfb0887bb42 to your computer and use it in GitHub Desktop.
Debug headers inspired by Phaser to show the awesomeness of GaussSense 🍻
function headerA() {
var v = "0.0.1";
// check if the brower is Chrome or Safari w/o jQuery
if (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) ||
/Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor)) {
var args = [
'%c %c %c GaussSense Desktop %c %c %c %c %c GaussSense.js v' + v + ' %c %c %c http://gausstoys.com 🍻',
'background: #f8afbc',
'background: #f4788f',
'color: #ffffff; background: #ef4262;',
'background: #f4788f',
'background: #f8afbc',
'background: #66E0F3',
'background: #3EBFE6',
'color: #ffffff; background: #00a4d2;',
'background: #3EBFE6',
'background: #66E0F3',
'background: #ffffff'
];
console.log.apply(console, args);
} else if (window['console']) {
console.log('GaussSense Desktop | GaussSense.js v' + v + ' | http://gausstoys.com');
}
};
function headerB() {
var v = "0.0.1";
// check if the brower is Chrome or Safari w/o jQuery
if (/Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor) ||
/Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor)) {
var args = [
'%c %c %c GaussSense Desktop | GaussSense.js v' + v + ' %c %c %c http://gausstoys.com 🍻',
'background: #9ff3f7',
'background: #43d5dd',
'color: #ffffff; background: #00a4d2;',
'background: #43d5dd',
'background: #9ff3f7',
'color: #005870; background: #ffffff'
];
console.log.apply(console, args);
} else if (window['console']) {
console.log('GaussSense Desktop | GaussSense.js v' + v + ' | http://gausstoys.com');
}
};
@erichoco
Copy link
Author

A

B

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment