Site icon Web Niraj

JavaScript: Leave a Message for Snooping Developers

Want to leave a little easter egg for snooping developers checking out the code on your app or website? This handy snippet of JavaScript code lets you leave a short message (or long one) for developers using the Developer Console to inspect your site, and works with Chrome, Safari and Firefox and other browser that support the console.log JavaScript function.

AppleWebKit browsers (Chrome, Safari, Opera etc) have a more advanced console than other browsers so you can style your messages using CSS, supporting a number of properties including color, font-size, font-family, font-weight, text-transform and more.

Code

See the gist on github.

Examples


Demo

Inspect the content of this page to see a custom message.

Exit mobile version