mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-25 12:15:18 +01:00
Feature/manifest v3 migration (#2889)
* migrate manifest to v3 * undo manifest changes for V3 * add separate manifest for v3 * use cross-env
This commit is contained in:
parent
378a1d5a73
commit
75f05f669f
@ -4,9 +4,11 @@
|
||||
"scripts": {
|
||||
"build": "webpack",
|
||||
"build:watch": "webpack --watch",
|
||||
"build:watch:MV3": "cross-env MANIFEST_VERSION=3 webpack --watch",
|
||||
"build:prod": "cross-env NODE_ENV=production webpack",
|
||||
"build:prod:watch": "cross-env NODE_ENV=production webpack --watch",
|
||||
"dist": "npm run build:prod && gulp dist",
|
||||
"dist:chromeMV3": "cross-env MANIFEST_VERSION=3 npm run build:prod && gulp dist:chrome",
|
||||
"dist:firefox": "npm run build:prod && gulp dist:firefox",
|
||||
"dist:opera": "npm run build:prod && gulp dist:opera",
|
||||
"dist:safari": "npm run build:prod && gulp dist:safari",
|
||||
|
129
apps/browser/src/manifest.json.v3
Normal file
129
apps/browser/src/manifest.json.v3
Normal file
@ -0,0 +1,129 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"minimum_chrome_version": "102.0",
|
||||
"name": "__MSG_extName__",
|
||||
"short_name": "__MSG_appName__",
|
||||
"version": "2022.05.0",
|
||||
"description": "__MSG_extDesc__",
|
||||
"default_locale": "en",
|
||||
"author": "Bitwarden Inc.",
|
||||
"homepage_url": "https://bitwarden.com",
|
||||
"icons": {
|
||||
"16": "images/icon16.png",
|
||||
"32": "images/icon32.png",
|
||||
"48": "images/icon48.png",
|
||||
"96": "images/icon96.png",
|
||||
"128": "images/icon128.png"
|
||||
},
|
||||
"content_scripts": [
|
||||
{
|
||||
"all_frames": true,
|
||||
"js": [
|
||||
"content/autofill.js",
|
||||
"content/autofiller.js",
|
||||
"content/notificationBar.js",
|
||||
"content/contextMenuHandler.js"
|
||||
],
|
||||
"matches": ["http://*/*", "https://*/*", "file:///*"],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
{
|
||||
"all_frames": false,
|
||||
"js": ["content/shortcuts.js"],
|
||||
"matches": ["http://*/*", "https://*/*", "file:///*"],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
{
|
||||
"all_frames": false,
|
||||
"js": ["content/message_handler.js"],
|
||||
"matches": ["http://*/*", "https://*/*", "file:///*"],
|
||||
"run_at": "document_start"
|
||||
},
|
||||
{
|
||||
"all_frames": true,
|
||||
"css": ["content/autofill.css"],
|
||||
"matches": ["http://*/*", "https://*/*", "file:///*"],
|
||||
"run_at": "document_end"
|
||||
}
|
||||
],
|
||||
"background": {
|
||||
"service_worker": "background.js"
|
||||
},
|
||||
"action": {
|
||||
"default_icon": {
|
||||
"19": "images/icon19.png",
|
||||
"38": "images/icon38.png"
|
||||
},
|
||||
"default_title": "Bitwarden",
|
||||
"default_popup": "popup/index.html"
|
||||
},
|
||||
"permissions": [
|
||||
"tabs",
|
||||
"contextMenus",
|
||||
"storage",
|
||||
"unlimitedStorage",
|
||||
"clipboardRead",
|
||||
"clipboardWrite",
|
||||
"idle",
|
||||
"webRequest",
|
||||
"declarativeNetRequest"
|
||||
],
|
||||
"optional_permissions": ["nativeMessaging"],
|
||||
"host_permissions": ["http://*/*", "https://*/*"],
|
||||
"content_security_policy": {
|
||||
"extension_page": "script-src 'self' ; object-src 'self'"
|
||||
},
|
||||
"commands": {
|
||||
"_execute_browser_action": {
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+Y",
|
||||
"linux": "Ctrl+Shift+U"
|
||||
},
|
||||
"description": "__MSG_commandOpenPopup__"
|
||||
},
|
||||
"_execute_sidebar_action": {
|
||||
"suggested_key": {
|
||||
"default": "Alt+Shift+Y",
|
||||
"linux": "Alt+Shift+U"
|
||||
},
|
||||
"description": "__MSG_commandOpenSidebar__"
|
||||
},
|
||||
"autofill_login": {
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+L"
|
||||
},
|
||||
"description": "__MSG_commandAutofillDesc__"
|
||||
},
|
||||
"generate_password": {
|
||||
"suggested_key": {
|
||||
"default": "Ctrl+Shift+9"
|
||||
},
|
||||
"description": "__MSG_commandGeneratePasswordDesc__"
|
||||
},
|
||||
"lock_vault": {
|
||||
"description": "__MSG_commandLockVaultDesc__"
|
||||
}
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": [
|
||||
"notification/bar.html",
|
||||
"images/icon38.png",
|
||||
"images/icon38_locked.png",
|
||||
"images/close.png"
|
||||
],
|
||||
"matches": ["<all_urls>"]
|
||||
}
|
||||
],
|
||||
"applications": {
|
||||
"gecko": {
|
||||
"id": "{446900e4-71c2-419f-a6a7-df9c091e268b}",
|
||||
"strict_min_version": "42.0"
|
||||
}
|
||||
},
|
||||
"sidebar_action": {
|
||||
"default_title": "Bitwarden",
|
||||
"default_panel": "popup/index.html?uilocation=sidebar",
|
||||
"default_icon": "images/icon19.png"
|
||||
}
|
||||
}
|
@ -72,7 +72,9 @@ const plugins = [
|
||||
}),
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
"./src/manifest.json",
|
||||
process.env.MANIFEST_VERSION == 3
|
||||
? { from: "./src/manifest.json.v3", to: "manifest.json" }
|
||||
: "./src/manifest.json",
|
||||
{ from: "./src/_locales", to: "_locales" },
|
||||
{ from: "./src/images", to: "images" },
|
||||
{ from: "./src/popup/images", to: "popup/images" },
|
||||
|
Loading…
Reference in New Issue
Block a user