MCPcopy Create free account
hub / github.com/violentmonkey/violentmonkey / updateState

Function updateState

src/background/utils/icon.js:202–209  ·  view source on GitHub ↗
(tab, data, title)

Source from the content-addressed store, hash-verified

200}
201
202function updateState(tab, data, title) {
203 const tabId = tab.id;
204 if (!data) data = badges[tabId] || resetBadgeData(tabId);
205 if (!title) [title] = getFailureReason(getTabUrl(tab), data);
206 browserAction.setTitle({ tabId, title });
207 setIcon(tab, data);
208 updateBadge(tab, data);
209}
210
211async function setIcon({ id: tabId } = {}, data = badges[tabId] || {}) {
212 const mod = !isApplied ? 'w'

Callers 2

icon.jsFile · 0.85
setBadgeFunction · 0.85

Calls 5

getTabUrlFunction · 0.90
resetBadgeDataFunction · 0.85
getFailureReasonFunction · 0.85
setIconFunction · 0.85
updateBadgeFunction · 0.85

Tested by

no test coverage detected