()
| 105 | } |
| 106 | |
| 107 | export async function hasMissingPermissions(): Promise<boolean> { |
| 108 | if (api.type !== 'webextension') return false; |
| 109 | const missingPermissions = new MissingPermissions(); |
| 110 | await missingPermissions.init(); |
| 111 | const missing = missingPermissions.getMissingPermissions(api.settings.get('customDomains')); |
| 112 | con.m('Missing Permissions').log(missing); |
| 113 | return Boolean(missing.length); |
| 114 | } |
| 115 | |
| 116 | function getOrigins(permissions: domainType[]) { |
| 117 | return permissions.filter(perm => isValidPattern(perm.domain)).map(perm => perm.domain); |
no test coverage detected