Manifest 文件格式
每个扩展都有一个 JSON 格式的清单文件,名为 manifest.json
,可提供重要信息。
字段描述(Field)
以下代码显示了扩展支持的清单字段,以及指向讨论每个字段的页面的链接。
{ // Required(必需的) "manifest_version": 3, "name": "My Extension", "version": "1.1",
// Recommended(推荐的) "action": {...}, "default_locale": "en", "description": "A plain text description", "icons": {...},
// Optional(可选的) "author": ..., "automation": ..., "background": { // Required "service_worker": "background.js", // Optional "type": ... }, "chrome_settings_overrides": {...}, "chrome_url_overrides": {...}, "commands": {...}, "content_capabilities": ..., "content_scripts": [{...}], "content_security_policy": {...}, "converted_from_user_script": ..., "cross_origin_embedder_policy": {"value": "require-corp"}, "cross_origin_opener_policy": {"value": "same-origin"}, "current_locale": ..., "declarative_net_request": ..., "devtools_page": "devtools.html", "differential_fingerprint": ..., "event_rules": [{...}], "externally_connectable": { "matches": ["://.example.com/*"] }, "file_browser_handlers": [...], "file_system_provider_capabilities": { "configurable": true, "multiple_mounts": true, "source": "network" }, "homepage_url": "https://path/to/homepage", "host_permissions": [...], "import": [{"id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}], "incognito": "spanning, split, or not_allowed", "input_components": ..., "key": "publicKey", "minimum_chrome_version": "versionString", "nacl_modules": [...], "natively_connectable": ..., "oauth2": ..., "offline_enabled": true, "omnibox": { "keyword": "aString" }, "optional_permissions": ["tabs"], "options_page": "options.html", "options_ui": { "chrome_style": true, "page": "options.html" }, "permissions": ["tabs"], "platforms": ..., "replacement_web_app": ..., "requirements": {...}, "sandbox": [...], "short_name": "Short Name", "storage": { "managed_schema": "schema.json" }, "system_indicator": ..., "tts_engine": {...}, "update_url": "https://path/to/updateInfo.xml", "version_name": "aString", "web_accessible_resources": [...] }
By.一粒技术服务.