Created
July 15, 2015 17:56
-
-
Save brentchow/e52d87210044c6961beb to your computer and use it in GitHub Desktop.
Appcues Console Trick
This file contains 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
(function(w) { | |
if (w.chrome && w.console) { | |
// Console Easter Egg. | |
// TODO: Abstract this into a separate library. | |
var logoStyle = [ | |
'margin: 10px 0', | |
'padding: 2px 3px 3px', | |
'color: transparent', | |
'background-image: url("http://appcues.com/images/logos/mark-angle.png")', | |
'background-repeat: no-repeat', | |
'background-size: 10px 10px', | |
'line-height: 14px', | |
'background-position: center center', | |
'border: 1px solid #4baad3', | |
'border-radius: 2px' | |
].join(';'), | |
logoTextStyle = [ | |
'margin: 10px 0 10px 4px', | |
'padding: 2px 0 3px', | |
'font-size: 13px', | |
'line-height: 14px', | |
'font-family: Helvetica', | |
'color: #4baad3', | |
].join(';'), | |
bodyTextStyle = [ | |
'font-size: 13px', | |
'line-height: 16px', | |
'font-family: Helvetica', | |
'color: #222' | |
].join(';'), | |
bold = bodyTextStyle + '; font-weight: bold', | |
shipit = [ | |
'background-image: url("https://github.global.ssl.fastly.net/images/icons/emoji/+1.png")', | |
'background-size: cover', | |
'line-height: 16px' | |
].join(';'); | |
console.log('\n%c %cAppcues\n\n%cHey friend. At Appcues, we love programming and building cool things that make the world better.\nIf that sounds like you too, email us at %[email protected].\n%cWe would love to meet you. %c \n\n', logoStyle, logoTextStyle, bodyTextStyle, bold, bodyTextStyle, shipit); | |
} | |
})(window); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment