Search code examples
javascriptgoogle-chrome-extensioncounter

Displaying counter over chrome extension icon


I'm building a chrome extension and I'd like to display a counter over the icon from my extension.

I think adblock does this to show how many ads got blocked.

I don't see how and where I should call the code to my counter to display it over the icon.

Thanks in advance!

Edit:

Seems like it's called a badge, found some documentation in the docs. I'll try it and update the post if it works


Solution

  • It worked with what I found : chrome.action.setBadgeText({ text: 'blablabla' });