Skip to content

Commit 37040e4

Browse files
committed
add view realtime timer for tab (badge text)
1 parent 882654c commit 37040e4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/background.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ function backgroundCheck() {
2323
chrome.idle.queryState(SETTINGS_INTERVAL_INACTIVITY, function (state) {
2424
if (state === 'active') {
2525
tab.summaryTime += 1;
26+
chrome.browserAction.setBadgeText({
27+
tabId: activeTab.id,
28+
text: String(convertSummaryTimeToString(tab.summaryTime))
29+
});
2630
}
2731
});
2832
}

0 commit comments

Comments
 (0)