Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Make manifest browser specific (#881)

Leendert de Borst6d197fe8705e
diff --git a/apps/browser-extension/wxt.config.ts b/apps/browser-extension/wxt.config.ts
index b31a9fddd..ede51a8e6 100644
--- a/apps/browser-extension/wxt.config.ts
+++ b/apps/browser-extension/wxt.config.ts
@@ -3,32 +3,40 @@ import { viteStaticCopy } from 'vite-plugin-static-copy';
// See https://wxt.dev/api/config.html
export default defineConfig({
- manifest: {
- name: "AliasVault",
- description: "AliasVault Browser AutoFill Extension. Keeping your personal information private.",
- version: "0.21.2",
- content_security_policy: {
- extension_pages: "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"
- },
- action: {
- default_title: "AliasVault"
- },
- permissions: [
+ manifest: ({ browser, manifestVersion, mode, command }) => {
+ const permissions = [
"storage",
"activeTab",
"contextMenus",
"scripting",
- "clipboardWrite",
- "offscreen"
- ],
- host_permissions: [
- "<all_urls>"
- ],
- commands: {
- "show-autofill-popup": {
- description: "Show the autofill popup (while focusing an input field)"
- }
+ "clipboardWrite"
+ ];
+
+ // Only add offscreen permission for Chrome and Edge
+ if (browser === 'chrome' || browser === 'edge') {
+ permissions.push("offscreen");
}
+
+ return {
+ name: "AliasVault",
+ description: "AliasVault Browser AutoFill Extension. Keeping your personal information private.",
+ version: "0.21.2",
+ content_security_policy: {
+ extension_pages: "script-src 'self' 'wasm-unsafe-eval'; object-src 'self';"
+ },
+ action: {
+ default_title: "AliasVault"
+ },
+ permissions,
+ host_permissions: [
+ "<all_urls>"
+ ],
+ commands: {
+ "show-autofill-popup": {
+ description: "Show the autofill popup (while focusing an input field)"
+ }
+ }
+ };
},
modules: ['@wxt-dev/module-react'],
srcDir: 'src',