Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
interface ChromeManifest
import { type ChromeManifest } from "https://deno.land/x/yxz@0.32.0/typing/chrome-manifest.ts";

Index Signatures

[k: string]: unknown

Properties

manifest_version: 2 | 3

One integer specifying the version of the manifest file format your package requires.

name: string

The name of the extension

version: string

One to four dot-separated integers identifying the version of this extension.

optional
default_locale: string

Specifies the subdirectory of _locales that contains the default strings for this extension.

optional
description: string

A plain text description of the extension

optional
icons: { [k: string]: unknown; 16?: string; 48?: string; 128?: string; 256?: string; }

One or more icons that represent the extension, app, or theme. Recommended format: PNG; also BMP, GIF, ICO, JPEG.

optional
chrome_url_overrides: { bookmarks?: string; history?: string; newtab?: string; }

Override pages are a way to substitute an HTML file from your extension for a page that Google Chrome normally provides.

optional
commands: { [k: string]: unknown; }

Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.

optional
content_scripts: [{ matches: [MatchPattern, ...MatchPattern[]]; exclude_matches?: MatchPattern[]; css?: Icon[]; js?: Scripts; run_at?: "document_start" | "document_end" | "document_idle"; all_frames?: boolean; include_globs?: GlobPattern[]; exclude_globs?: GlobPattern[]; match_about_blank?: boolean; }, ...{ matches: [MatchPattern, ...MatchPattern[]]; exclude_matches?: MatchPattern[]; css?: Icon[]; js?: Scripts; run_at?: "document_start" | "document_end" | "document_idle"; all_frames?: boolean; include_globs?: GlobPattern[]; exclude_globs?: GlobPattern[]; match_about_blank?: boolean; }[]]

Content scripts are JavaScript files that run in the context of web pages.

optional
devtools_page: string

A DevTools extension adds functionality to the Chrome DevTools. It can add new UI panels and sidebars, interact with the inspected page, get information about network requests, and more.

optional
externally_connectable: { ids?: string[]; matches?: string[]; accepts_tls_channel_id?: boolean; }

Declares which extensions, apps, and web pages can connect to your extension via runtime.connect and runtime.sendMessage.

optional
file_browser_handlers: [{ id: string; default_title: string; file_filters: [string, ...string[]]; }, ...{ id: string; default_title: string; file_filters: [string, ...string[]]; }[]]

You can use this API to enable users to upload files to your website.

optional
homepage_url: string

The URL of the homepage for this extension.

optional
incognito: "spanning" | "split" | "not_allowed"

Specify how this extension will behave if allowed to run in incognito mode.

optional
input_components: { name: string; type: string; id: string; description: string; language: string; layouts: unknown[]; }[]

Allows your extension to handle keystrokes, set the composition, and manage the candidate window.

optional
key: string

This value can be used to control the unique ID of an extension, app, or theme when it is loaded during development.

optional
minimum_chrome_version: string

The version of Chrome that your extension, app, or theme requires, if any.

optional
nacl_modules: [{ path: string; mime_type: string; }, ...{ path: string; mime_type: string; }[]]

One or more mappings from MIME types to the Native Client module that handles each type.

optional
oauth2: { client_id: string; scopes: [string, ...string[]]; }

Use the Chrome Identity API to authenticate users: the getAuthToken for users logged into their Google Account and the launchWebAuthFlow for users logged into a non-Google account.

optional
offline_enabled: boolean

Whether the app or extension is expected to work offline. When Chrome detects that it is offline, apps with this field set to true will be highlighted on the New Tab page.

optional
omnibox: { keyword: string; }

The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.

optional
optional_permissions: Permissions
optional
options_page: string

To allow users to customize the behavior of your extension, you may wish to provide an options page. If you do, a link to it will be provided from the extensions management page at chrome://extensions. Clicking the Options link opens a new tab pointing at your options page.

optional
options_ui: { [k: string]: unknown; page: string; chrome_style?: boolean; open_in_tab?: boolean; }

To allow users to customize the behavior of your extension, you may wish to provide an options page. If you do, an Options link will be shown on the extensions management page at chrome://extensions which opens a dialogue containing your options page.

optional
permissions: Permissions1
optional
requirements: { 3D?: { features: ["webgl", ..."webgl"[]]; }; plugins?: { npapi: boolean; }; }

Technologies required by the app or extension. Hosting sites such as the Chrome Web Store may use this list to dissuade users from installing apps or extensions that will not work on their computer.

optional
sandbox: { pages: [Icon, ...Icon[]]; content_security_policy?: string; }

Defines an collection of app or extension pages that are to be served in a sandboxed unique origin, and optionally a Content Security Policy to use with them.

optional
short_name: string

The short name is typically used where there is insufficient space to display the full name.

optional
update_url: string

If you publish using the Chrome Developer Dashboard, ignore this field. If you host your own extension or app: URL to an update manifest XML file.

optional
tts_engine: { voices: [{ voice_name: string; lang?: string; gender?: string; event_types: [
| "start"
| "word"
| "sentence"
| "marker"
| "end"
| "error"
, ...(
| "start"
| "word"
| "sentence"
| "marker"
| "end"
| "error"
)[]]
; }, ...{ voice_name: string; lang?: string; gender?: string; event_types: [
| "start"
| "word"
| "sentence"
| "marker"
| "end"
| "error"
, ...(
| "start"
| "word"
| "sentence"
| "marker"
| "end"
| "error"
)[]]
; }[]]
; }

Register itself as a speech engine.

optional
version_name: string

In addition to the version field, which is used for update purposes, version_name can be set to a descriptive version string and will be used for display purposes if present.

optional
chrome_settings_overrides: unknown
optional
content_pack: unknown
optional
current_locale: unknown
optional
import: unknown
optional
platforms: unknown
optional
signature: unknown
optional
spellcheck: unknown
optional
storage: unknown
optional
system_indicator: unknown