Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Example Firefox add-ons created using the WebExtensions API

License

NotificationsYou must be signed in to change notification settings

mdn/webextensions-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://github.com/mdn/webextensions-examples

Maintained by Mozilla'sAdd-ons team.

WebExtensions are a way to write browser extensions: that is, programsinstalled inside a web browser that modify the behavior of the browser orweb pages loaded by the browser. WebExtensions are built on a set ofcross-browser APIs, so WebExtensions written for Google Chrome, Opera, orEdge will, in most cases, run in Firefox too.

The "webextensions-examples" repository is a collection of simple,complete, and installable WebExtensions. The examples show how to use theWebExtensions APIs, and you can use them as a starting point for yourWebExtensions.

For an index of all the examples, see the"Example extensions" page on MDN.

The examples are made available under theMozilla Public License 2.0.

How to use "webextensions-examples"

To use the repository, first clone it.

Each example is in a top-level folder and includes a short README explainingwhat it does. To see how an example works, install it in Firefox by followingtheinstallation instructions.

To find your way around a WebExtension's internal structure, have a look at theAnatomy of a WebExtensionpage on MDN.

To use these examples in Firefox, use the most recent release of Firefox.However, most examples work with earlier releases.

A few examples rely on APIs that are only available in pre-release versionsof Firefox. Where this is the case, the example declares the minimum versionthat it needs in thestrict_min_version attribute of thebrowser_specific_settings keyin the extension's manifest.json file.

Installing an example

Some examples work only on specific domains or pages. Details of anyrestrictions are provided in each example's README file. None of theexamples work in private browsing windows by default, seeExtensions in Private Browsingfor details.

To run an example extension:

  1. Open Firefox and load theabout:debugging page. ClickLoad Temporary Add-onand select themanifest.json file within the folder of an example extension.
  2. Install theweb-exttool. At the command line, open the example extension's folder and typeweb-ext run. This launches Firefox and installs the extension automatically.This tool provides some additional development features, such asautomatic reloading.

Support for other browsers

These examples are tested in Firefox. They may work in other browsers, if thebrowser supports the APIs used.Note that these examples all use thebrowser namespace and promises towork with asynchronous functions. This means the examples won't work inChrome unless you use thepolyfill provided by Mozilla.Seethe overview of WebExtension APIsfor more information.

Learn more

To learn more about developing WebExtensions, see theWebExtensions documentation on MDNfor getting started guides, tutorials, and full API reference docs.

Problems?

If you encounter an issue:

If you cannot resolve the issue,file a bug.

Contributing

We welcome contributions, whether they are new examples, new features, bugfixes, or translations of localizable strings. Please see theCONTRIBUTING.mdfile for more details.


[8]ページ先頭

©2009-2025 Movatter.jp