1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 13:53:34 +00:00

Make nativeMessaging optional on all platforms except firefox (#1565)

Make nativeMessaging optional on all platforms except firefox
This commit is contained in:
Oscar Hinton
2021-01-25 17:24:33 +01:00
committed by GitHub
parent c6af9266b7
commit 54da244340
3 changed files with 36 additions and 0 deletions

View File

@@ -75,6 +75,7 @@ function distOpera() {
delete manifest.applications;
delete manifest.content_security_policy;
removeShortcuts(manifest);
moveNativeMessagingToOptional(manifest);
return manifest;
});
}
@@ -85,6 +86,7 @@ function distChrome() {
delete manifest.content_security_policy;
delete manifest.sidebar_action;
delete manifest.commands._execute_sidebar_action;
moveNativeMessagingToOptional(manifest);
return manifest;
});
}
@@ -95,6 +97,7 @@ function distEdge() {
delete manifest.content_security_policy;
delete manifest.sidebar_action;
delete manifest.commands._execute_sidebar_action;
moveNativeMessagingToOptional(manifest);
return manifest;
});
}
@@ -108,6 +111,14 @@ function removeShortcuts(manifest) {
}
}
function moveNativeMessagingToOptional(manifest) {
const index = manifest.permissions.indexOf("nativeMessaging");
index > -1 ? manifest.permissions.splice(index, 1) : false
manifest.optional_permissions = [
"nativeMessaging"
];
}
function distSafariMas(cb) {
return distSafariApp(cb, 'mas');
}