(tab_id: Tab_Id)
| 78 | }) |
| 79 | |
| 80 | function 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 | |
| 100 | function send_connection_status_to_popup(place: Place_Name, state: boolean) { |
| 101 | if (popup) { |
no test coverage detected
searching dependent graphs…