chrome.browserAction.setBadgeText(object details)Sets the badge text for the browser action. The badge is displayed on top of the icon.
Parameters
details
( object )
-
- text( string )
- Any number of characters can be passed, but only about four can fit in the space.
- tabId( optional integer )
- Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.
- text
chrome.browserAction.setIcon(object details)Sets the background color for the badge.
Parameters
details
( object )
-
- color( array of integer )
- An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is
[255, 0, 0, 255]
. - tabId( optional integer )
- Limits the change to when a particular tab is selected. Automatically resets when the tab is closed.
- color