Does this work for you, Kahil? It seems to be working for me.

if (!window.fluid) {
        return;
}
try {
        doBadgeUpdates(5000);
} catch(e) {
        window.console.log(e);
}
function doBadgeUpdates(timeout) {
        //just regex for a digit. easy.
        updateBadge(“fb_menu_inbox_unread_count_holder”, /(\d+)/);
        setTimeout(doBadgeUpdates, timeout);
}
function updateBadge(id, new_post_regex) {
        notice_divs = document.getElementById(id).getElementsByTagName
(‘span’);
        if (notice_divs.length > 0) {
                new_post_html = notice_divs[0].innerHTML;
                count = new_post_regex.exec(new_post_html)[0];
                count_int = parseInt(count);
                if (count_int > 0)
                        window.fluid.dockBadge = count_int;
                else
                        window.fluid.dockBadge = “”;
        } else {
                window.fluid.dockBadge = “”;
        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"fluidapp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluidapp?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to