Take the 2-minute tour ×
Stack Apps is a question and answer site for apps, scripts, and development with the Stack Exchange API. It's 100% free, no registration required.


Per this question: http://meta.stackoverflow.com/questions/57315/can-we-get-notification-in-the-tab-change-of-title This user script was created to help draw attention to notifications even when the tab isn't in focus. It changes the page title to include the 'unreadCount' from the StackExchange SuperCollider.


// ==UserScript==
// @name           SE Tab Notifier
// @namespace      http://fosco.com
// @description    Update Tab Title when Inbox has content
// @include        http://*.stackexchange.com/*
// @include        http://superuser.com/*
// @include        http://serverfault.com/*
// @include        http://meta.stackoverflow.com/*
// @include        http://stackoverflow.com/*
// ==/UserScript==

var script = document.createElement("script");
script.textContent = "(" + grease.toString() + ")()";

function grease()
 var notifyme = function ()
       if ($('#portalLink a.unreadCount').is(':visible')) {
               var x = $(document).attr('title');
               var count = $('#portalLink a.unreadCount').text();
               var len = Math.floor(count/10);
               if (x.substring(0,len+2) != count + ' ') {
                       $(document).attr('title',count + ' ' + x);
 window.setInterval(notifyme, 1000);






gfosco AT gmail

share|improve this question
I have some trouble make this script run. I have installed tampermonkey extension for chrome as recommended here stackoverflow.com/questions/5258989/…. I have copy paste the script above but it isn't working. Also I would like to add joomla.stackexchange.com in @include but I don't understand where I am suppose to add the *. Thanks a lot! –  Arone Oct 9 at 10:30
@fosco I've made a fix to this one to get it working and added in rep as well as notifications, want me to post my changes as an edit? –  DavidG 1 hour ago

You must log in to answer this question.

Browse other questions tagged .