Stay organized with collections Save and categorize content based on your preferences.
Every extension must have a manifest.json
file in its root directory that lists important information about the structure and behavior of that extension. This page explains the structure of extension manifests and the features they can include.
The following example manifests show the basic manifest structure and some commonly used features as a starting point for creating your own manifest:
Minimal manifest{
"manifest_version": 3,
"name": "Minimal Manifest",
"version": "1.0.0",
"description": "A basic example extension with only required keys",
"icons": {
"48": "images/icon-48.png",
"128": "images/icon-128.png"
}
}
Register a content script
{
"manifest_version": 3,
"name": "Run script automatically",
"description": "Runs a script on www.example.com automatically when user installs the extension",
"version": "1.0",
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"content_scripts": [
{
"js": [
"content-script.js"
],
"matches": [
"http://*.example.com//"
]
}
]
}
Inject a content script
{
"manifest_version": 3,
"name": "Click to run",
"description": "Runs a script when the user clicks the action toolbar icon.",
"version": "1.0",
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"background": {
"service_worker": "service-worker.js"
},
"action": {
"default_icon": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
}
},
"permissions": ["scripting", "activeTab"]
}
{
"manifest_version": 3,
"name": "Popup extension that requests permissions",
"description": "Extension that includes a popup and requests host permissions and storage permissions .",
"version": "1.0",
"icons": {
"16": "images/icon-16.png",
"32": "images/icon-32.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"action": {
"default_popup": "popup.html"
},
"host_permissions": [
"https://*.example.com/"
],
"permissions": [
"storage"
]
}
Side panel
{
"manifest_version": 3,
"name": "Side panel extension",
"version": "1.0",
"description": "Extension with a default side panel.",
"icons": {
"16": "images/icon-16.png",
"48": "images/icon-48.png",
"128": "images/icon-128.png"
},
"side_panel": {
"default_path": "sidepanel.html"
},
"permissions": ["sidePanel"]
}
Manifest keys
The following is a list of all supported manifest keys.
Keys required by the Extensions platform"manifest_version"
3
.
"name"
chrome://extensions
). The maximum length is 75 characters. For information on using locale-specific names, see Internationalization.
"version"
"description"
"icons"
"action"
chrome.action
.
"background"
"chrome_settings_overrides"
"chrome_url_overrides"
"commands"
"content_scripts"
"content_security_policy"
"cross_origin_embedder_policy"
"cross_origin_opener_policy"
"declarative_net_request"
"default_locale"
"devtools_page"
"export"
"externally_connectable"
"externally_connectable"
.
"homepage_url"
"host_permissions"
"import"
"incognito"
"spanning"
, "split"
, and "not_allowed"
. For more information, see Incognito.
"key"
"minimum_chrome_version"
"107"
or "107.0.5304.87"
. Users with versions of Chrome older than the minimum version see a "Not compatible" warning in the Chrome Web Store, and are unable to install your extension. If you add this to an existing extension, users whose Chrome version is older won't receive automatic updates to your extension. This includes business users in ephemeral mode.
"oauth2"
"client_id"
and "scopes"
properties. For details, see the OAuth 2.0 tutorial.
"omnibox"
"optional_host_permissions"
"optional_permissions"
"options_page"
"options_ui"
"permissions"
"requirements"
"sandbox"
"short_name"
"side_panel"
"storage"
"tts_engine"
"update_url"
"version_name"
"1.0 beta"
and "build rc2"
. If this is unspecified, the "version" value displays on the extension management page instead.
"web_accessible_resources"
"file_browser_handlers"
fileBrowserHandler
API, which lets extensions access the ChromeOS file browser.
"file_handlers"
file_handlers
.
"file_system_provider_capabilities"
fileSystemProvider
API, which lets extensions create file systems that ChromeOS can use.
"input_components"
input_components
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2012-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2012-09-18 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5