recursal/MDN huggingface dataset:
options\_page
=============

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"options\_page": "options/options.html"
```
 |

**Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

**Warning:** This manifest key has been deprecated. Use `options_ui` instead.

Use the `options_page` key to define an options page for your extension.

The options page contains settings for the extension. The user can access it from the browser's add-ons manager, and you can open it from within your extension using `runtime.openOptionsPage()`.

Unlike options pages specified using the newer `options_ui` key, options pages specified using the deprecated `options_page` key don't receive browser styles and always open in a normal browser tab.

Example
-------


```json
"options\_page": "options/options.html"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `options_ui`
* Options pages
author
======

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"author": "Walt Whitman"
```
 |

The extension's author, intended for display in the browser's user interface. If the developer key is supplied and it contains the "name" property, it will override the author key. There's no way to specify multiple authors.

This is a localizable property.

Example
-------


```json
"author": "Walt Whitman"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
chrome\_url\_overrides
======================

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
  "chrome\_url\_overrides" : {
    "newtab": "my-new-tab.html"
  }
```
 |

Use the `chrome_url_overrides` key to provide a custom replacement for the documents loaded into various special pages usually provided by the browser itself.

Syntax
------

The `chrome_url_overrides` key is an object that may have the following properties:

| Name | Type | Description |
| --- | --- | --- |
| `bookmarks` | `String` | Provide a replacement for the page that shows the bookmarks. |
| `history` | `String` | Provide a replacement for the page that shows the browsing history. |
| `newtab` | `String` | 
 Provide a replacement for the document that's shown in the "new tab"
 page. This is the page that's shown when the user has opened a new tab
 but has not loaded any document into it: for example, by using the
 `Ctrl`/`Command`+`T` keyboard shortcut.


 The replacement is given as a URL to an HTML file. The file must be
 bundled with the extension: you can't specify a remote URL here. You
 can specify it relative to the extension's root folder, like:
 "path/to/newtab.html".


 The document can load CSS and JavaScript, just like a normal web page.
 JavaScript running in the page gets access to the same
 privileged "browser.\*" APIs
 as the extension's background script.


 It's very good practice to include a
 <title> for the
 page, or the tab's title will be the "moz-extension://..." URL.


 A common use case is to let the user define a new tab page: to do
 this, provide a custom new tab page that navigates to the page the
 user defined.


 If two or more extensions both define custom new tab pages, then the
 last one to be installed or enabled gets to use its value.

To override the browser's homepage, use "chrome\_settings\_overrides" instead. |

All properties are localizable.

Example
-------


```json
"chrome\_url\_overrides" : {
  "newtab": "my-new-tab.html"
}
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
devtools\_page
==============

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"devtools\_page": "devtools/my-page.html"
```
 |

Use this key to enable your extension to extend the browser's built-in devtools.

This key is defined as a URL to an HTML file. The HTML file must be bundled with the extension, and the URL is relative to the extension's root.

The use of this manifest key triggers an install-time permission warning about devtools. To avoid an install-time permission warning, mark the feature as optional by listing the `"devtools"` permission in the `optional_permissions` manifest key.

See Extending the developer tools to learn more.

Example
-------


```json
"devtools\_page": "devtools/my-page.html"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
storage
=======

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"storage": {
  "managed\_schema": "schema.json"
}
```
 |

Use the `storage` key to specify the name of the schema file that defines the structure of data in managed storage.

Managed data declares the enterprise policies supported by the app. Policies are analogous to options but are configured by a system administrator instead of the user, enabling the app to be configured for all users of an organization.

After declaring the policies, they are read from the `storage.managed` API. However, if a policy value does not conform to the schema, then it is not published by the `storage.managed` API. It's up to the app to enforce the policies configured by the administrator.

**Note:** Firefox does not define a schema for managed storage, see `storage.managed` for more details.

The `storage` key is an object that has the following required property:

|  |  |
| --- | --- |
| `managed_schema` | 
 A `String` specifying the full path of the file within the
 extension that defines the schema of the manage storage.
  |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

**Note:**

This page includes details from the Chrome developer website page Manifest for storage areas included here under the Creative Commons Attribution 3.0 United States License.
icons
=====

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |

The `icons` key specifies icons for your extension. Those icons will be used to represent the extension in components such as the Add-ons Manager.

It consists of key-value pairs of image size in px and image path relative to the root directory of the extension.

If `icons` is not supplied, a standard extension icon will be used by default.

You should supply at least a main extension icon, ideally 48x48 px in size. This is the default icon that will be used in the Add-ons Manager. You may, however, supply icons of any size and Firefox will attempt to find the best icon to display in different components.

Firefox will consider the screen resolution when choosing an icon. To deliver the best visual experience to users with high-resolution displays, such as Retina displays, provide double-sized versions of all your icons.

Example
-------

The keys in the `icons` object specify the icon size in px, values specify the relative icon path. This example contains a 48px extension icon and a larger version for high-resolution displays.


```json
"icons": {
  "48": "icon.png",
  "96": "icon@2x.png"
}
```

SVG
---

You can use SVG and the browser will scale your icon appropriately. There are currently two caveats though:

1. You need to specify a viewBox in the image. E.g.:

```html
<svg
 xmlns="http://www.w3.org/2000/svg"
 viewBox="0 0 48 48"
 width="48"
 height="48">
  <!-- your svg content -->
</svg>
```

2. Even though you can use one file, you still need to specify various size of the icon in your manifest. E.g.:

```json
"icons": {
  "48": "icon.svg",
  "96": "icon.svg"
}
```


**Note:** Only Firefox is known to support SVG icons. Chromium has a bug about unsupported SVG icons.

**Note:** Remember to include the `xmlns` attribute when creating the SVG. Otherwise, Firefox won't be able to display the icon.

**Note:** If you are using a program like Inkscape for creating SVG, you might want to save it as a "plain SVG". Firefox might be confused by various special namespaces and not display your icon.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
dictionaries
============

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"dictionaries": {
  "en-US": "dictionaries/en-US.dic"
}
```
 |

The `dictionaries` key specifies the `locale_code` for which your extension supplies a dictionary. Although the dictionary consists of two files, one with a `.dic` and one with an `.aff` file extension, only the one with the `.dic` extension is referenced in the manifest.json.

If you use the `dictionaries` key, you must also set an ID for your extension using the `browser_specific_settings` manifest.json key.

Example
-------


```json
"dictionaries": {
  "en-US": "dictionaries/en-US.dic"
}
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
version\_name
=============

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"version\_name": "0.1 beta"
```
 |

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.

If no **version\_name** is present, the **version** field will be used for display purposes as well.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
version
=======

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | Yes |
| Example | 
```json
"version": "0.1"
```
 |

The **version string** for the extension.

Version format
--------------

The version string consists of 1 to 4 numbers separated by dots, for example, `1.2.3.4`. Non-zero numbers must not include a leading zero. For example, `2.01` is not allowed; however, `0.2`, `2.0.1`, and `2.10` are allowed.

Extension stores and browsers may enforce or warn if the version string doesn't comply with this format. They may also apply restrictions to the range of numbers available. For example:

* addons.mozilla.org (AMO) allows version strings using numbers of up to nine digits, complying with this regular expression `^(0|[1-9][0-9]{0,8})([.](0|[1-9][0-9]{0,8})){0,3}$`. Also, from Firefox 108, a warning is provided if an extension is installed with a version number that doesn't match this format.
* The Chrome Web Store requires numbers between 0 and 65535 and does not permit all-zero extension strings. For example, 0.0 or 0.0.0.0 are not permitted.

It may be possible to create an extension that appears to have a valid version number when run in a browser but doesn't comply with store requirements. Particular care should be taken when developing cross-browser extensions that use large number elements.

Some browsers and web stores may recognize the version\_name key. This key enables you to provide a descriptive version string that may be displayed instead of the version number. For example, `1.0 beta`.

### Comparing versions

To determine which of two extension versions is the most recent, the version string numbers are compared left to right. A missing version string element is equivalent to `0`. For example, 1.0 is equivalent to 1.0.0.0. The first version string with a number greater than the corresponding number in the other version string is the most recent. For example, 1.10 is a more recent version than 1.9.

Legacy version formats
----------------------

See Legacy version formats for details of previously supported version strings.

Access the version number in code
---------------------------------

You obtain the extension version in your JavaScript code using:


```js
console.log(browser.runtime.getManifest().version);
```


If the manifest contains:


```json
"version": "0.1"
```


You see this in the console log:
```

"0.1"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
short\_name
===========

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"short\_name": "My Extension"
```
 |

Short name for the extension. If given, this will be used in contexts where the name field is too long. It's recommended that the short name should not exceed 12 characters. If the short name field is not included in manifest.json, then name will be used instead and may be truncated.

This is a localizable property.

Example
-------


```json
"short\_name": "My Extension"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
user\_scripts
=============

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 |
| Example | 
```json
  "user\_scripts": {
    "api\_script": "apiscript.js",
  }
```

 |

Instructs the browser to load a script packaged in the extension, known as the API script, this script is used to export a set of custom API methods for use in user scripts. The API script path, relative to the manifest.json file, is defined as a `string` in `"api_script"`.

**Note:** The `user_script` key is required for the `userScripts` API to function, even if no API script is specified. For example. `user_scripts: {}`.

The API script:

* runs in the content processes.
* has access to the window and document globals related to the webpage it is attached to.
* has access to the same subset of WebExtension APIs usually available in a content script.

The script executes automatically on any webpage defined in `matches` by `userScripts.register`. However, this is before the user script sandbox object is created and the custom API methods can be exported.

To export the custom API methods, the script listens for `userScripts.onBeforeScript` and then export the custom API methods.

Not every user script may need to consume all of the custom API methods. You can, therefore, include details of the APIs needed in `scriptMetadata` when running `userScripts.register`. The API script then accesses the `scriptMetadata` through the `script` parameter received by the `userScripts.onBeforeScript` listener (as `script.metadata`).

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `userScripts`
* `contentScripts`
externally\_connectable
=======================

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```
"externally_connectable": {
  "ids": [
    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
    "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "cccccccccccccccccccccccccccccccc"
  ],
  "matches": [
    "https://example1.com/*",
    "*://*.example2.com/*"
  ]
}
```
 |

Externally connectable controls which other extensions and web pages can communicate with an extension using `runtime.connect()` and `runtime.sendMessage()` message passing. If `externally_connectable` is not specified, all extensions can communicate with each other but not with web pages.

**Note:**
 For communication with web pages:


* In Chrome, `chrome.runtime.connect` and `chrome.runtime.sendMessage` are used. These methods are only available when there is at least one extension listening for messages, see chrome.runtime will no longer be defined unconditionally in Chrome 106 for more details.
* In Safari, `browser.runtime.connect` and `browser.runtime.sendMessage` are used.
* In Firefox, neither API is supported. See Firefox bug 1319168.

### "ids" attribute

`ids` enables communication between this extension and other installed extensions specified by extension identifiers. Use the pattern `"*"` to communicate with all extensions.

### "matches" attribute

`matches` is a list of regular expressions that enables communication between an extension and the web pages that match the expression.

**Note:** If `externally_connectable` is not specified, communication among extensions is allowed as if `externally_connectable` specified `{"ids": ["*"] }`. Therefore, if you specify `externally_connectable.matches`, don't forget to add `ids` if you want to communicate with other extensions.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
description
===========

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"description": "Replaces pictures with pictures of cats."
```
 |

A short description of the extension, intended for display in the browser's user interface. In Firefox and Chrome this value can be up to 132 characters. The limit in other browsers may differ.

This is a localizable property.

Example
-------


```json
"description": "Replaces pictures with pictures of cats."
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
homepage\_url
=============

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"homepage\_url": "https://example.org/my-addon"
```
 |

URL for the extension's home page.

 If a developer key containing the "url" property and "homepage\_url" are defined, Firefox uses "developer.url" while Opera uses "homepage\_url".
 Chrome and Safari do not support the "developer" key.

This is a localizable property.

Example
-------


```json
"homepage\_url": "https://github.com/mdn/webextensions-examples/tree/main/beastify"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
offline\_enabled
================

|  |  |
| --- | --- |
| Type | `Boolean` |
| Mandatory | No |
| Manifest version | 2 |
| Example | 
```json
"offline\_enabled": true
```
 |

**Non-standard:** This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

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.

As of Chrome 35, apps (ChromeOS only from 2018) are assumed to be offline enabled and the default value of `"offline_enabled"` is `true` unless `"webview"` permission is requested. In this case, network connectivity is assumed to be required and `"offline_enabled"` defaults to `false`.

The `"offline_enabled"` value is also used to determine whether a network connectivity check will be performed when launching an app in ChromeOS kiosk mode. A network connectivity check will be performed when apps are not offline enabled, and app launching put on hold until the device obtains connectivity to the Internet.

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
developer
=========

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"developer": {
  "name": "Walt Whitman",
  "url": "https://en.wikipedia.org/wiki/Walt\_Whitman"
}
```
 |

The name of the extension's developer and their homepage URL, intended for display in the browser's user interface.

The object, and both of its properties, are optional. The "name" and "url" properties, if present, will override the author and homepage\_url keys, respectively. This object only allows for a single developer name and URL to be specified.

This is a localizable property.

Example
-------


```json
"developer": {
  "name": "Walt Whitman",
  "url": "https://en.wikipedia.org/wiki/Walt\_Whitman"
}
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
default\_locale
===============

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | 
 Contingent: must be present if the \_locales subdirectory is present,
 must be absent otherwise.
  |
| Example | 
```json
"default\_locale": "en"
```
 |

This key must be present if the extension contains the \_locales directory, and must be absent otherwise. It identifies a subdirectory of \_locales, and this subdirectory will be used to find the default strings for your extension.

See Internationalization.

Example
-------


```json
"default\_locale": "en"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
name
====

|  |  |
| --- | --- |
| Type | `String` |
| Mandatory | Yes |
| Example | 
```json
"name": "My Extension"
```
 |

Name of the extension. This is used to identify the extension in the browser's user interface and on sites like addons.mozilla.org.

It's good practice to keep the name short enough to display in the UI. Google Chrome and Microsoft Edge restrict the name length to 45 characters.

This is a localizable property.

Example
-------


```json
"name": "My Extension"
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.
omnibox
=======

|  |  |
| --- | --- |
| Type | `Object` |
| Mandatory | No |
| Manifest version | 2 or higher |
| Example | 
```json
"omnibox": {
  "keyword": "mdn"
}
```
 |

Use the `omnibox` key to define an omnibox keyword for your extension.

When the user types this keyword into the browser's address bar, followed by a space, then any subsequent characters will be sent to the extension using the `omnibox` API. The extension will then be able to populate the address bar's drop-down suggestions list with its own suggestions.

If two or more extensions define the same keyword, then the extension that was installed last gets to control the keyword. Any previously installed extensions that defined the same keyword will no longer be able to use the `omnibox` API.

Example
-------


```json
"omnibox": {
  "keyword": "mdn"
}
```

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.