(extensionId: string)
| 15 | const extensionId = params.get('id')!; |
| 16 | |
| 17 | async function getAllowlist(extensionId: string): Promise<Storage['allowlist'] | undefined> { |
| 18 | const allowlist = await new Promise<Storage['allowlist']>((resolve) => { |
| 19 | chrome.runtime.sendMessage( |
| 20 | extensionId, |
| 21 | { type: 'allowlist' }, |
| 22 | (response: Storage['allowlist']) => { |
| 23 | resolve(response); |
| 24 | } |
| 25 | ); |
| 26 | }); |
| 27 | return allowlist; |
| 28 | } |
| 29 | |
| 30 | // Clear any bad state from another tab. |
| 31 | chrome.runtime.sendMessage(extensionId, { type: 'success' }); |