I am developing a chrome extension that shows notifications.
I am showing the notifications using these functions chrome.browserAction.setBadgeBackgroundColor
and chrome.browserAction.setBadgeText
.
This is what it looks like:
After the user have seen the notifications I want to remove this badge.
I have tried to make it transparent but this was the result:
Can anyone help me how to remove the badge, or if there is another way that makes what I want?
Solution
When writing an empty text, the badge goes away.
To remove the badge count, simply set the text as an empty string:
chrome.browserAction.setBadgeText({
'text': '' //an empty string displays nothing!
});