Created
December 11, 2019 15:20
-
-
Save keif/c353011632bff0fd4aa2aa9d0eeec395 to your computer and use it in GitHub Desktop.
A simple script to add a colored console message.
This file contains hidden or 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
const sayHello = () => { | |
if (navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { | |
var args = ['\n %c Made with ♥ by <name> %c %c %c http://www.dogstudio.co/ %c %c \n', 'color: #fff; background: #e43333; padding:5px 0;', 'background: #131419; padding:5px 0;', 'background: #131419; padding:5px 0;', 'color: #fff; background: #1c1c1c; padding:5px 0;', 'background: #fff; padding:5px 0;', 'color: #e43333; background: #fff; padding:5px 0;'] | |
window.console.log.apply(console, args) | |
} else if (window.console) { | |
window.console.log('Made with love ♥ <name> - http://www.dogstudio.co/') | |
} | |
} | |
export default sayHello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment