FaviconNotifier

FaviconNotifier updates the chat tab favicon whenever a new message is detected and you're not focused on the chat.

Installation
Add the following to your wiki's MediaWiki:Chat.js or your personal chat.js:

Customization
All variables are stored in the  global object, which must be defined before the importArticles statement. All of the options shown below are completely optional, and the script will work just as fine without them.
 * circleColor
 * A hex value or a color name for the circle in the favicon. Default: #dd0000


 * textColor
 * A hex value or a color name for the text (and for the smaller circle) inside the main one. Default: white


 * includeInlineAlerts
 * If you for some reason need inline alerts to trigger the icon change, set this to true. Default: false


 * countMainMessages
 * This script only adds a small dot to represent unread main messages. This will change it so the number represents all the unread messages. Default: false


 * ignoreMainMessages
 * Provides no visible indicator for unread main room messages. Overrides countMainMessages. Default: false

Example customization with all variables edited outside of their default behavior (which is not recommended, but for completeness' sake):