background.js
// updates, shows and hides the badge
updates, shows and hides the badge
updates shows and hides the badge
function UpdateUnreadBadge()
{
    if(unreadInfo == null)
    {
        return;
    }
    var total = 0;
    var str = "";
    for(var key in unreadInfo)
    {
        total = total + unreadInfo[key].unreadtotal;
    }
    if(!options.readlaterincludetotal && unreadInfo[readLaterFeedID] != null)
    {
        total = total - unreadInfo[readLaterFeedID].unreadtotal;
    }
    if(total > 0)
    {
        str = total + "";
    }
    if(options.unreadtotaldisplay == 0 || options.unreadtotaldisplay == 2)
    {
        str = "";
    }
    unreadTotal = total;
    chrome.browserAction.setBadgeText({text: str});
    if(viewerPort != null)
    {
        viewerPort.postMessage({type: "unreadtotalchanged"});
    }
}
function UpdateUnreadBadge ( ) { if ( unreadInfo == null ) { return ; } var total = 0 ; var str = "" ; for ( var key in unreadInfo ) { total = total + unreadInfo [ key ] . unreadtotal ; } if ( ! options . readlaterincludetotal && unreadInfo [ readLaterFeedID ] != null ) { total = total - unreadInfo [ readLaterFeedID ] . unreadtotal ; } if ( total > 0 ) { str = total + "" ; } if ( options . unreadtotaldisplay == 0 || options . unreadtotaldisplay == 2 ) { str = "" ; } unreadTotal = total ; chrome . browserAction . setBadgeText ( { text : str } ) ; if ( viewerPort != null ) { viewerPort . postMessage ( { type : "unreadtotalchanged" } ) ; } }
updates, shows and hides the badge
updates shows and hides the badge
// they don't want toolbar unread updates // update badge // update title