Manifest.json file for Google Chrome plugin

The package.json file contains the configuration of the entire project, the basic information of the project, the dependencies of the project, etc. The plug-in development also has this file, that is manifest.json file

Every extension has a JSON-formatted manifest file, named manifest.json, that provides important information

(Each extension has a JSON-formatted manifest file called manifest.json, which provides important information.)

File information

{
  / / will be options
  "manifest_version": 2."name": "My Extension"."version": "versionString"./ / advice
  "default_locale": "en"."description": "A plain text description"."icons": {... },// Choose one of the two/none
  "browser_action": {... },"page_action": {... },/ / options
  "action":... ."author":... ."automation":... ."background": {
    / / advice
    "persistent": false./ / is optional
    "scripts": []},"chrome_settings_overrides": {... },"chrome_url_overrides": {... },"commands": {... },"content_capabilities":... ."content_scripts": [{...}],
  "content_security_policy": "policyString"."converted_from_user_script":... ."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": "http://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"."signature":... ."spellcheck":... ."storage": {
    "managed_schema": "schema.json"
  },
  "system_indicator":... ."tts_engine": {... },"update_url": "http://path/to/updateInfo.xml"."version_name": "aString"."web_accessible_resources": [...]. }Copy the code

Field to explain

1And manifest_version: number

An integer that specifies the version of the manifest file format required by the package. Starting with Chrome 18, specify 2

2,The name | short_name: string

The name and short_name attributes are extension names.

The name contains a maximum of 45 characters

Short_name contains a maximum of 12 characters. If left blank, the name field is used. This field is usually used in places where there is insufficient space to display the full name

Name is displayed in:

  • Download the box
  • Extended Management Interface
  • Google mall

Short_name is displayed in:

  • App Startup page
  • newtabpage

3,Version | version_name: versionString

The version of your plugin

Use 0-4 dot separated integers that must be between 0 and 65535 inclusive, and non-zero integers cannot start with 0. For example, neither 99999 nor 032 is valid

Version Examples:
  • “version”: “1”
  • “Version” : “1.0”
  • “Version” : “2.10.2”
  • “Version” : “3.1.2.4567”
Version_name (version name)

Version_name can be set to a descriptive version string and will be used for display purposes at display time. If there is no version_NAME field, version is displayed.

  • “Version_name” : “1.0 beta”
  • “version_name”: “build rc2”
  • “Version_name” : “3.1.2.4567”

4,default_locale

The default locale

This field is required if the plugin has the _locales folder. This field cannot be filled if the plugin does not have the _locales folder, and an error will be reported.

5,description

Description, plug-in description

6,icons

Plugin ICONS should be square, with the same width and height

Supports 16 x 16, 32 x 32(for Windows), 48 x 48, and 128 x 128

"icons": { 
    "16": "icon16.png"."48": "icon48.png"."128": "icon128.png" 
}
Copy the code

7,browser_action

Browser operations

Click the plug-in icon on the right of the browser, and the page window pops up

Examples of Google Translate plug-ins:

"browser_action": {
  "default_icon": {
    "16": "images/icon16.png"."24": "images/icon24.png"."32": "images/icon32.png"
  },
  "default_icon": "images/icon32.png"
  "default_title": "Google Mail"."default_popup": "popup.html" 
}
Copy the code

Default_icon is written as an object/string

Eight,page_action

Page operation

Put them in the browser plug-in location, not in the input box

The execution is normal on the current page. The current page is no longer displayed in gray

Example:

"page_action": {
  "default_icon": {
    "16": "images/icon16.png"."24": "images/icon24.png"."32": "images/icon32.png"
  },
  "default_icon": "images/icon32.png"
  "default_title": "Google Mail"."default_popup": "popup.html" 
}
Copy the code

Default_icon is written as an object/string

9, the action

The action field needs to be in the Canary Channel (developer-only daily build) version/new version, not in the stable version

‘action’ requires canary channel or newer, but this is the stable channel.

10, the author

The author information

11, automation

automation

This API is experimental. It is only available to Chrome users on the dev channel.(API is experimental)

12,background

Background (Background Script Management)

Enables Chrome to start earlier and close later

The background page remains running after loading. The background page does not unload until all visible views and all message ports are closed. All js files are displayed in the scripts array, and the persistent field is generally false

"background": {
    "scripts": ["background1.js"."background2.js". ] ."persistent": false
},
Copy the code

The only point to keep background scripts active is if the extension blocks or modifies web requests using the Chrome.webrequest API. The webRequest API is not compatible with non-persistent background pages.

13,chrome_settings_overrides

Setting alternative functionality is one way that the extension replaces the selected Chrome Settings.

"chrome_settings_overrides": {
    "homepage": "http://www.homepage.com"."search_provider": {
        "name": "name.__MSG_url_domain__"."keyword": "keyword.__MSG_url_domain__"."search_url": "http://www.foo.__MSG_url_domain__/s?q={searchTerms}"."favicon_url": "http://www.foo.__MSG_url_domain__/favicon.ico"."suggest_url": "http://www.foo.__MSG_url_domain__/suggest?q={searchTerms}"."instant_url": "http://www.foo.__MSG_url_domain__/instant?q={searchTerms}"."image_url": "http://www.foo.__MSG_url_domain__/image?q={searchTerms}"."search_url_post_params": "search_lang=__MSG_url_domain__"."suggest_url_post_params": "suggest_lang=__MSG_url_domain__"."instant_url_post_params": "instant_lang=__MSG_url_domain__"."image_url_post_params": "image_lang=__MSG_url_domain__"."alternate_urls": [
          "http://www.moo.__MSG_url_domain__/s?q={searchTerms}"."http://www.noo.__MSG_url_domain__/s?q={searchTerms}"]."encoding": "UTF-8"."is_default": true
    },
    "startup_pages": ["http://www.startup.com"]}Copy the code

In addition to search_url, you can also use alternate_urls as an array

"chrome_settings_overrides": {
    "homepage": "https://home.superboss.cc/index.html#/"."search_provider": {
        "name": "myName"."keyword": "Ha ha"."search_url": "https://img.alicdn.com/imgextra/i4/305442977/O1CN01oadttT1XrVfooSTZ9_!! 305442977.png"."favicon_url": "https://staticnew.superboss.cc/qianniu/img/superboss.ico"."suggest_url": "https://f.superboss.cc/ProductUsingServlet? kind=14&ftrace=1228&landingPage=%E4%B8%BB%E5%9B%BE%E6%B0%B4%E5%8D%B0#/multipleFunc/waterList/"."instant_url": "https://developer.chrome.com/extensions/settings_override"."image_url": "https://img.alicdn.com/imgextra/i3/826052692/O1CN01RLLHYU1VkypJ4XsyD_!! 826052692.png"."search_url_post_params": "String for search_URL"."suggest_url_post_params": Suggest_url string."instant_url_post_params": "Instant_url string"."image_url_post_params": "Image_url string"."encoding": "UTF-8"."is_default": true
    },
    "startup_pages": ["https://yunyin.superboss.cc/proRight/index.html"]},Copy the code

The sample

14,chrome_url_overrides

Overrides Google Chrome specific pages

Replaceable pages:

  • Chrome :// Bookmarks
  • History page Chrome ://history
  • The new page chrome: / / newtab
"chrome_url_overrides" : {
    "bookmarks": "bookmarks.html"."history": "history.html"."newtab": "newtab.html"
}
Copy the code

15,commands

You can use the command API to add keyboard shortcuts that trigger actions in the extender.

From chrome: / / extensions/shortcuts plug-in set shortcuts

Supported keys: A-Z, 0-9, Comma, Period, Home, End, PageUp, PageDown, Space, Insert, Delete, Arrow keys (Up, Down, Left, Right) and the Media Keys (MediaNextTrack, MediaPlayPause, MediaPrevTrack, MediaStop).

All keys must contain Ctrl* / Alt, but Ctrl + Alt combinations are not allowed

"commands": {
    "my-commands": {
        "suggested_key": {
            "default": "Ctrl+Shift+Y"."mac": "Command+Shift+Y"
        },
        "description": "this is my command"."global": true | false}},Copy the code

By chrome.com mands. OnCommand. AddListener monitored setting commands

chrome.commands.onCommand.addListener(function(command) {
    console.log('Command: name', command);
    // my-commands
});
Copy the code

In chrome: / / extensions/as shown in the shortcuts

Global Is a global property, limited to specifying only Ctrl + Shift + [0..9] as a global shortcut.

16,content_capabilities

White list

Sites that match the specified URL pattern are granted the specified permissions.

stackoverflow

The sample

17,content_scripts

Content scripts

Content scripts are files that run in the context of a web page. Using the standard Document Object Model (DOM), they can read the details of a web page visited by the browser, make changes to it and pass the information to its parent extension.

"content_scripts": [{"matches": ["http://*.taobao.com/*"]."css": ["myStyles.css"]."js": ["contentScript.js"]}]Copy the code

This will run contentScript.js and myStyles.css in the page http://*.taobao.com/*

field explain
matches Mandatory specifies which pages this content script will be injected into
css Optionally, the CSS to be inserted into the page is injected in array order
js Optionally insert page JS in array order
match_about_blank optionalstackoverflow
exclude_matches Optionally exclude the URL page injected by this script
include_globs Optional URL containing the field
exclude_globs Optionally exclude urls that contain fields
run_at Optional when files are injected into the pagedocument_idle.document_start.document_end
all_frames The option to inject all pages of the current TAB is optional. The default is false.
Run_at field explain
document_idle Preferred indocument_endwithwindow.onloadInsert scripts immediately after the event is triggered. The exact injection time depends on the complexity of the document and how long it takes to load, and is optimized for page loading speed. You can ensure that they run after the DOM is complete.
document_start Injected after the CSS file, but before constructing any other DOM or running any other scripts.
document_end Inject scripts after the DOM is complete, but before loading subresources such as images and frames.

17,content_security_policy

Content security Policy

Will make extensions more secure by default.

Default security policy:

script-src 'self'; object-src 'self'
Copy the code

In the 18th and converted_from_user_script

User script conversion (confused)

Boolean type

19, current_locale

Current locale

20,declarative_net_request

Use to block or modify web requests by specifying declarative rules (Chrome 84 + supports)

"declarative_net_request" : {
  "rule_resources" : [{
    "id": "ruleset_1"."enabled": true."path": "rules_1.json"
  }, {
    "id": "ruleset_2"."enabled": false."path": "rules_2.json"
  }, {
    "id" : 1."priority": 1."action" : { "type" : "block" },
    "condition" : {
      "urlFilter" : "abc"."domains" : ["foo.com"]."resourceTypes" : ["script"]]}}},Copy the code

21,devtools_page

Expand the developer options page

Front-end development vUE, React will use plug-ins, can display the corresponding components, data, etc. It is rendered by devTools_page

"devtools_page": "devtools.html".Copy the code

It can be created using chrome’s DevTools method

chrome.devtools.panels.create(
    'myTestplu'.'icons/icon128.png'.'devtools.html'.function (panel) {
    }
)

chrome.devtools.panels.elements.createSidebarPane("myTestplu2".function(sidebar) {
        sidebar.setObject({ some_data: "Some data to show" });
});
Copy the code

22, differential_fingerprint

"differential_fingerprint": {
    "channel": "stable"."extension_types": "all"
}
Copy the code

23,event_rules

Event rules

Rules can be blocked or modified using declarativeWebRequest for web request rules, etc

"event_rules": [{
    "event": "declarativeContent.onPageChanged"."actions": [{
      "type": "declarativeContent.ShowPageAction"}]."conditions": [{
      "type": "declarativeContent.PageStateMatcher"."css": ["video"]}}]],Copy the code

This is equivalent to using declarativeWebRequest

chrome.declarativeContent.onPageChanged.addRules([{
  actions: [
    new chrome.declarativeContent.ShowPageAction()
  ],
  conditions: [
    new chrome.declarativeContent.PageStateMatcher(
        {css: ["video"]}})]]);Copy the code

24,externally_connectable

External links can be matched

If externally_connectable is not specified, all extenders and applications can connect.

"externally_connectable": {
    "ids": []."matches": []."accepts_tls_channel_id": false
}
Copy the code
  • ids: extension ID, if not specified all will not be linked, if to match all, ‘*’
  • matches: Matching pattern of web pages. Content scripts are not affected. If this field is not specified, no web page can be connected
  • accepts_tls_channel_id: true | false; Indicates the TLS channel ID of the web page to which the extender is connected. If it is true if the method required by the runtime. The connect or runtime. SendMessage set messages sent to the runtime. MessageSender. TlsChannelId. If it is false. In any case will not set the runtime MessageSender. TlsChannelId.

25,file_browser_handlers

Extension for Chrome OS file browser

This parameter is valid only for Chrome OS

Permissions need to be declared in permissions

"file_browser_handlers": [{"id": "upload"."default_title": "Save to Gallery"."file_filters": [
      "filesystem:*.jpg"."filesystem:*.jpeg"."filesystem:*.png"]}],"permissions" : [
  "fileBrowserHandler"
]
Copy the code

Operate in the browser’s fileBrowserHandler event

chrome.fileBrowserHandler.onExecute.addListener(function(id, details) {
    if (id == 'upload') {
      var fileEntries = details.entries;
      for (var i = 0, entry; entry = fileEntries[i]; ++i) {
        entry.file(function(file) {}); }}});Copy the code

26,file_system_provider_capabilities

You can create a file system

FileSystemProvider needs to be declared in permissions

"permissions": [
  "fileSystemProvider"]."file_system_provider_capabilities": {
  "configurable": true."watchable": false."multiple_mounts": true."source": "network"
},
Copy the code
  • Configurable: Boolean; Whether onConfigureRequested is supported. Default: false
  • Multiple_mounts: Boolean; Whether multiple installed file systems are supported. Default: false.
  • Watchable: Boolean; Supports setting observers and notifying them of changes. Default: false.
  • Source: Mandatory: “file”, “device”, or “network”. Mount the data source of the file system.

27,homepage_url

"homepage_url": "https://www.baidu.com".Copy the code

Right-click the small icon of the plug-in and click the name of the plug-in to jump to the page

28,host_permissions

The host permissions

"host_permissions": {
    "channel": "dev"."extension_types": ["extension"]."min_manifest_version": 3
}
Copy the code

29,import

The import

Use the import field to declare resources that they depend on for a particular shared module

"import": [{"id": "cccccccccccccccccccccccccccccccc"},
    {"id": "dddddddddddddddddddddddddddddddd"
     "minimum_version": "0.5" // optional},]Copy the code

30,export

export

The export field indicates that the extension is a shared module and can export its resources

"export": {
    "allowlist": [
      "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"."bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"]}Copy the code

An optional list of extension ids that are allowed to import this shared module resource. If no allowed list is given, all extensions can import it.

31,incognito

Can be enabled in traceless mode

Three values: spanning/ split/ not_allowed

  • Spanning: Runs in a single shared process and all events or messages from the incognito tag are sent to the shared process with a incognito flag indicating their origin.
  • Split: means that all application pages in the incognito window will run in their own incognito process. If the application or extension contains a background page, that page will also run in stealth. The stealth process runs concurrently with the regular process.
  • Not_allowed: The extension cannot be enabled in stealth mode.

32,input_components

Custom IME

Add input permissions in permissions

"permissions": [
    "input"]."input_components": [{"name": "Test IME"."type": "ime"."id": "test"."description": "Test IME".// User visible description
  "language": "en-US"./ / language
  "layouts": ["us::eng"]  // The supported language}]Copy the code
var ime_api = chrome.input.ime;
var context_id = -1;
console.log("Initializing IME");
ime_api.onFocus.addListener(function(context) {
  console.log('onFocus:' + context.contextID);
  context_id = context.contextID;
});
ime_api.onBlur.addListener(function(contextID) {
  console.log('onBlur:' + contextID);
  context_id = -1;
});
ime_api.onActivate.addListener(function(engineID) {
  console.log('onActivate:' + engineID);
});
ime_api.onDeactivated.addListener(function(engineID) {
  console.log('onDeactivated:' + engineID);
});
ime_api.onKeyEvent.addListener(
function(engineID, keyData) {
  console.log('onKeyEvent:' + keyData.key + " context: " + context_id);
  if (keyData.type == "keydown" && keyData.key.match(/^[a-z]$/)) {
    chrome.input.ime.commitText({"contextID": context_id,
                                 "text": keyData.key.toUpperCase()});
    return true;
  }
  return false
});
Copy the code

33,key

The key of the extension program

This value is usually not needed. This will be set automatically when packing.crx.

34,minimum_chrome_version

The lowest supported version of Chrome

35,nacl_modules

Nacl module (Native Client module)

"nacl_modules": [{
    "path": "OpenOfficeViewer.nmf"."mime_type": "application/vnd.oasis.opendocument.spreadsheet"
  },
  {
    "path": "OpenOfficeViewer.nmf"."mime_type": "application/vnd.oasis.opendocument.spreadsheet-template"
  },
  {
    "path": "ExcelViewer.nmf"."mime_type": "application/excel"
}]
Copy the code
  • Path:.nmfLocation of file
  • Mime_type: type

36, natively_connectable

The local link

"natively_connectable": {
    "channel": "dev"."extension_types": ["extension"]}Copy the code

37,oauth2

Verifying user identity

OAuth2 is an industry standard protocol for authorization. It provides a mechanism for granting Web and desktop applications access to private information without sharing user names, passwords, and other private credentials.

"oauth2": {
    "client_id": "yourExtensionOAuthClientIDWillGoHere.apps.googleusercontent.com"."scopes": [""]}Copy the code

38,offline_enabled

Whether it can be used offline

39,omnibox

Allows you to register keywords in the address bar of Google Chrome

"omnibox": { "keyword" : "omnix" },
Copy the code
chrome.omnibox.onInputChanged.addListener(
  function(text, suggest) {
    console.log('inputChanged: ' + text);
    suggest([
      {content: text + " one".description: "the first one"},
      {content: text + " number two".description: "the second entry"}]); });// This event is fired with the user accepts the input in the omnibox.
chrome.omnibox.onInputEntered.addListener(
  function(text) {
    console.log('inputEntered: ' + text);
    alert('You just typed "' + text + '"');
});
Copy the code

40,optional_permissions

Optional permissions

Claimed optional permissions are requested at run time but not at install time, so the user can understand why they are needed and grant only the necessary permissions.

Permissions that cannot be set as optional permissions:

  • debugger
  • declarativeNetRequest
  • devtools
  • experimental
  • geolocation
  • mdns
  • proxy
  • tts
  • ttsEngine
  • wallpaper

41,permissions

Declare permissions

If you want to use Chrome’s API, you need a permission declaration.

permissions describe
activeTab Request extension permission according to the activeTab specification.
alarms The extension accesses the Chrome. Alarms API.
background Has background permissions to run in the background until you exit Chrome; Typically, the background permission is used with the background page, event page, or background window.
bookmarks Extension to access the Chrome. bookmarks API.
browsingData The extension has access to the Chrome.BrowsingData API.
certificateProvider Chrome extensions granted. CertificateProvider API access.
clipboardRead Mandatory document.execCommand(‘paste’) if used by an extension or application.
clipboardWrite Indicates that an extension or application uses Document. execCommand(‘copy’) or document.execCommand(‘cut’).
contentSettings The extension accesses the Chrome.ContentSettings API.
contextMenus Extension to access chrome. ContextMenus API.
cookies The extension accesses the Chrome. Cookies API.
debugger The extension accesses the Chrome. debugger API.
declarativeContent Visit chrome extension. DeclarativeContent API.
declarativeNetRequest Visit chrome extension. DeclarativeNetRequest API.
declarativeNetRequestFeedback Awarded the add-in for chrome. DeclarativeNetRequest API method of events and access.
declarativeWebRequest Add-in for chrome. DeclarativeWebRequest API access.
desktopCapture The extension has access to the Chrome.DesktopCapture API.
displaySource The extension grants access to the Chrome.DisplaySource API.
dns The extension accesses the Chrome.dns API.
documentScan Permissions for the extension to access the Chrome.DocumentScan API.
downloads The extension accesses the Chrome.Downloads API.
enterprise.deviceAttributes Visit the chrome extension. Enterprise. DeviceAttributes API.
enterprise.hardwarePlatform Visit the chrome extension. Enterprise. HardwarePlatform API.
enterprise.networkingAttributes Visit chrome.enterprise.net extensions workingAttributes API.
enterprise.platformKeys Visit the chrome extension. Enterprise. PlatformKeys API.
experimental This field is mandatory for extensions or applications that use any Chrome. experimental.* API.
fileBrowserHandler Chrome extensions granted. FileBrowserHandler API access.
fileSystemProvider Visit chrome extension. FileSystemProvider API.
fontSettings The extension accesses the Chrome. fontSettings API.
gcm The extension accesses the Chrome.gcm API.
geolocation Extensions or applications use the proposed HTML5 geolocation API without prompting the user for permission.
history The extension accesses the Chrome.history API.
identity The extension accesses the Chrome.Identity API.
idle The extension has access to the Chrome.idle API.
idltest The extension has access to the Chrome.idltest API.
login The extension has access to the Chrome.login API.
loginScreenStorage Visit chrome extension. LoginScreenStorage API.
loginState Extension access to the Chrome. LoginState API.
management The extension accesses the Chrome. management API.
nativeMessaging The extender can access the native messaging API.
notifications The extension accesses the Chrome. notifications API.
pageCapture The extension can access the Chrome.Pagecapture API.
platformKeys The extension has access to the Chrome.PlatformKeys API.
power The extension accesses the Chrome.power API.
printerProvider Permissions for the extension to access the Chrome. printerProvider API.
printing The extension accesses the Chrome. printing API.
printingMetrics The extension has access to the Chrome. PrintingMetrics API.
privacy The extension accesses the Chrome.privacy API.
processes Extensions can access the Chrome.processes API.
proxy The extension has access to the Chrome.proxy API.
scripting The extension has access to the Chrome. scripting API.
search The extension has access to the Chrome.search API.
sessions The extension accesses the Chrome. sessions API.
signedInDevices The extension has access to the Chrome. signedInDevices API.
storage The extension has access to the Chrome.storage API.
system.cpu The extension accesses the Chrome.system. CPU API.
system.display The extension accesses the Chrome.system.display API.
system.memory The extension accesses the Chrome.system.memory API.
system.storage The extension accesses the Chrome.system. storage API.
tabCapture The extension accesses the Chrome. tabCapture API.
tabGroups Extension permission to access the Chrome. tabGroups API.
tabs The extension has access to the privileged fields of objects used by multiple Tab apis, including Chrome. tabs and Chrome. Windows. In many cases, your extension does not have to declare “tabs” permission to use these apis.
topSites The extension accesses the Chrome.TopSites API.
tts The extension has access to the Chrome.tts API.
ttsEngine Extension access to chrome.ttsEngine API.
unlimitedStorage Provide unlimited quotas for storing HTML5 client data, such as databases and locally stored files. Without this license, extensions or applications are limited to 5 MB of local storage.
vpnProvider Permission for the extension to access the Chrome. VpnProvider API.
wallpaper The extension accesses the Chrome. Wallpaper API.
webNavigation Extension to access the Chrome. WebNavigation API.
webRequest The extension has access to the Chrome.webrequest API
webRequestBlocking If the extension prevents the use of the Chrome. webRequest API, this parameter is mandatory.

42,platforms

platform

43, replacement_web_app

"replacement_web_app": {
    "channel": "stable"."extension_types": ["extension"."platform_app"]."min_manifest_version": 2
}
Copy the code

44,requirements

The technology required to apply or extend the program.

"requirements": {
  "3D": {
    "features": ["webgl"]},"plugins": {
    "npapi": true}}Copy the code

45,sandbox

Starting with Chrome 57, Chrome will no longer allow sandbox pages to contain external Web content (including embedded frames and scripts). Use webView instead

46,webview

Load live content from the Web proactively over the Web and embed it in your Chrome app.

"permissions": ["webview"]."webview": {
    "partitions": [{"name": "partition"."accessible_resources": [""]]}}Copy the code

47, signature

The signature

48,storage

storage

Unlike local and synchronous storage, managed storage requires that its structure be declared as a JSON structure.

"storage": {
    "managed_schema": "schema.json"
}
Copy the code

49, system_indicator

Reference stackoverflow

50,tts_engine

The TTS engine

Use the Chrome.ttsEngine API to implement the text-to-speech (TTS) engine through extensions.

"permissions": ["ttsEngine"]."tts_engine": {
  "voices": [{"voice_name": "Alice"."lang": "en-US"."event_types": ["start"."marker"."end"] {},"voice_name": "Pat"."lang": "en-US"."event_types": ["end"]]}},Copy the code

Event_types:

  • Start: The engine is starting to sound.
  • Word: Reach word boundaries. Use event.charindex to determine the current voice position.
  • Sentence: Reach the boundary of the sentence. Use event.charindex to determine the current voice position.
  • Marker: SSML marker has been reached. Use event.charindex to determine the current voice position.
  • End: The engine has spoken.
  • Error: An engine-specific error occurred and cannot be said. Get the information in event.errorMessage.

51,update_url

Updated URL, see Automatic update

52,web_accessible_resources

Resource paths that can be injected into web pages

"web_accessible_resources": [
    "images/*.png"."style/double-rainbow.css"."script/double-rainbow.js"."script/main.js"."templates/*"].Copy the code

Refer to the link

  • developer.chrome.com/extensions

Denver annual essay | 2020 technical way with me The campaign is under way…