mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-25 10:07:41 +00:00
fix(extension): support Google Drive video frames
This commit is contained in:
@@ -150,6 +150,18 @@ export function requestOriginPermission(chromeApi, originPattern) {
|
||||
).catch(() => false);
|
||||
}
|
||||
|
||||
export function containsOriginPermission(chromeApi, originPattern) {
|
||||
if (typeof originPattern !== 'string' || !originPattern) {
|
||||
return Promise.resolve(null);
|
||||
}
|
||||
return callBooleanPermissionMethod(
|
||||
chromeApi,
|
||||
'contains',
|
||||
{ origins: [originPattern] },
|
||||
{ timeoutMs: 1000 }
|
||||
).catch(() => null);
|
||||
}
|
||||
|
||||
export function isHostAccessError(error) {
|
||||
const message = typeof error?.message === 'string' ? error.message : String(error || '');
|
||||
return /host permission|permission to access (?:this|the|respective) host|cannot access contents of/i.test(message);
|
||||
|
||||
Reference in New Issue
Block a user