views:

121

answers:

1

Hey guys, so I have a tab for twitter.com open all the time in Chrome and I've written a userscript that checks the document title every so often for new tweets. Since the Twitter web interface automatically checks, it will show (2) Twitter / Home as the title if there are two new tweets. Everything works as I want it to, and right now I have it show me an alert() message, but I would like to provide a more subtle notification. The purpose of this is to be able to "pin" the Twitter tab to just the favicon and still get notifications. I've tried searching for ways to dynamically change the favicon of a page but it doesn't look like Chrome supports that. Do guys have any other ideas for this so it can notify me of new tweets without stealing focus with an alert() box?

Here is the code if anyone is interested:

checkTweets();

function checkTweets()
{
    var newTweets = document.title.match(/[\d\.]+/g);

    if(newTweets != null)
    {
        alert(newTweets[0]);
    }

    setTimeout("checkTweets()", 10000);
}
A: 

Chritter will put twitter notifications in your statusbar. If you want a different UI, you might want to think about making your own extension. See the documentation for info about what parts of the UI an extension can change.

Annie
Yeah, I know about the twitter clients for Chrome. I think my best bet is going to be to modify one of them.. I don't like their interfaces, I just want something that tells me I have new tweets and opens the web interface when clicked.I've spent some time modifying a twitter client extension to just that but I'd still like to be able to do it this way if at all possible.It doesn't seem like I'll be able to do anything other than alert() boxes just with a userscript though. :(
sachleen
Annie, Chritter was much easier to modify to do what I want than Metrist. I've gotten it to work exactly how I want now. Thanks :D
sachleen