Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Update window title when new notifications are pending

#3

The title of the window should reflect that there are notifications pending. This will allow users to see new messages by glancing at their tab bar.

Reported by Thadd Selden · December 1st, 2008 @ 07:37 AM

State: new
Milestone: none
Assigned to: Thadd Selden Thadd Selden

Activity

  1. Thadd Selden
    Thadd Selden
    • Assigned user set to Thadd Selden

    December 1st, 2008 @ 03:02 PM

  2. Thadd Selden
    Thadd Selden

    This isn't quite as easy as it first seems. Changing the title is simple, just say:

    
    document.title = "New title"
    

    The challenge is that you don't have a way to know that the user is not viewing the page at the time unless the user has set their status as away. So, a notification will come in, the title gets updated, but then on the first message update the notification is cleared and the title goes back to normal.

    December 2nd, 2008 @ 10:58 AM

  3. Thadd Selden
    Thadd Selden

    An idea:

    A hidden status field could be set via a function like the following:

    
    window.onblur = function() {jQuery('#window_hidden').html('true');}
    window.onfocus = function() {jQuery('#window_hidden').html('false');}
    

    The notification AJAX response can then check the content of this div to determine whether to change the title.

    December 2nd, 2008 @ 11:02 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.