(type)
| 115 | } |
| 116 | |
| 117 | async function notifyContentScripts(type) { |
| 118 | try { |
| 119 | const tabs = await chrome.tabs.query({}); |
| 120 | for (const tab of tabs) { |
| 121 | if (tab.id) { |
| 122 | chrome.tabs.sendMessage(tab.id, { type }).catch(() => { |
| 123 | // Expected: tabs without content script |
| 124 | }); |
| 125 | } |
| 126 | } |
| 127 | } catch (err) { |
| 128 | console.error('[gstack bg] Failed to query tabs for notification:', err.message); |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // ─── Command Proxy ───────────────────────────────────────────── |
| 133 |
no outgoing calls
no test coverage detected