MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / toggle_action_icon

Function toggle_action_icon

extension/src/background.ts:80–98  ·  view source on GitHub ↗
(tab_id: Tab_Id)

Source from the content-addressed store, hash-verified

78})
79
80function toggle_action_icon(tab_id: Tab_Id) {
81
82 if (script_content_map.get(tab_id)?.detection?.solid) {
83 chrome.action.setIcon({tabId: tab_id, path: ICONS_BLUE})
84
85 /*
86 For some reason setting the icon immediately does not always work
87 */
88 setTimeout(() => {
89 if (script_content_map.get(tab_id)?.detection?.solid) {
90 chrome.action.setIcon({tabId: tab_id, path: ICONS_BLUE})
91 } else {
92 chrome.action.setIcon({tabId: tab_id, path: ICONS_GRAY})
93 }
94 }, 600)
95 } else {
96 chrome.action.setIcon({tabId: tab_id, path: ICONS_GRAY})
97 }
98}
99
100function send_connection_status_to_popup(place: Place_Name, state: boolean) {
101 if (popup) {

Callers 2

on_disconnectedFunction · 0.85
on_messageFunction · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…