Web Niraj
  • Facebook
  • Flickr
  • Github
  • Linkedin
  • Twitter
  • YouTube
Online portfolio, code examples and developer blog
  • Home
  • About Me
  • Contact Me
  • Portfolio
  • WordPress
Search the site...
  • Home
  • Blog
  • JavaScript: Leave a Message for Snooping Developers

JavaScript: Leave a Message for Snooping Developers

2

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

Examples

Console Message - SafariConsole Message - FirefoxConsole Message - Chrome
Demo

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

Developers, JavaScript, Tutorial

2 comments on “JavaScript: Leave a Message for Snooping Developers”

  1. EyeAmN8 says:
    March 18, 2014 at 5:17 PM

    Pretty cool, I didnt know you could do this

    Reply
  2. Roman says:
    May 9, 2014 at 6:38 AM

    Your posts are hard to read due to tiny font size and low color contrast.

    Reply

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

StackExchange / StackOverflow

profile for Niraj Shah on Stack Exchange, a network of free, community-driven Q&A sites

Tags

Amazon Web Services Android Android 4.4 KitKat Android 5.0 Lollipop Apache API Application Backup Bug Command Line Cordova Example Facebook Facebook Graph API Facebook PHP SDK 4.0 Facebook Social Plugins Fan Page Flash Geolocation Google Nexus 5 Google Nexus One Hacking HTML5 Image Manipulation iOS iPhone JavaScript jQuery Laravel 5 Linux NodeJS Parse PDF PHP Plugin Portfolio Review Security Server SSH SSL Sysadmin Tutorial WordPress WordPress Plugins
© 2011-2021 Niraj Shah
  • Privacy Policy
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkPrivacy Policy