Is it possible for my extension to add a small text tag like "(Recorded!)" at the end of tab titles to show the user that a particular tab has been viewed? The code below appears to be functioning correctly in the debugger, indicating that tab.title is updated with "(Recorded!)", but the title in chrome itself remains unchanged. Should I be refreshing the tab programmatically to see the new title? If so, how can I do this without triggering the onUpdated listener again? Or if not, what would you suggest as an alternative approach?
// Retrieve the title of the updated tab and add "NYTimes.com" in order to increment count
chrome.tabs.onUpdated.addListener(function(url, changeInfo, Tab)
{
chrome.tabs.getSelected(null, function(tab)
{
var title = tab.title;
if (title.indexOf("NYTimes.com") != -1 && changeInfo.status == "complete")
{
tab.title = title + ' (Recorded!)';
localStorage.setItem('nyt', ++nytCount);
}
});
});