{"id":14341259,"url":"https://github.com/thunderbird/webext-examples","last_synced_at":"2025-06-14T06:05:37.984Z","repository":{"id":49262166,"uuid":"148425751","full_name":"thunderbird/webext-examples","owner":"thunderbird","description":"Example extensions for Thunderbird WebExtensions APIs","archived":false,"fork":false,"pushed_at":"2025-04-03T07:45:08.000Z","size":1299,"stargazers_count":90,"open_issues_count":2,"forks_count":35,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-16T01:07:04.896Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thunderbird.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-09-12T05:24:03.000Z","updated_at":"2025-04-03T07:45:13.000Z","dependencies_parsed_at":"2023-02-12T01:46:29.098Z","dependency_job_id":"a9316be3-5c28-4557-b867-aa45269f084d","html_url":"https://github.com/thunderbird/webext-examples","commit_stats":null,"previous_names":["thunderbird/sample-extensions","thundernest/sample-extensions"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thunderbird/webext-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fwebext-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fwebext-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fwebext-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fwebext-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thunderbird","download_url":"https://codeload.github.com/thunderbird/webext-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thunderbird%2Fwebext-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768604,"owners_count":22908229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-26T14:01:08.534Z","updated_at":"2025-06-14T06:05:37.978Z","avatar_url":"https://github.com/thunderbird.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# WebExtension Examples\n\nThis is a collection of WebExtensions for Thunderbird to showcase how the available WebExtension APIs can be used. Each example exists for Manifest V2 and V3. The Manifest V3 compatible versions include comments to highlight the required changes.\n\nManifest V3 is officially supported since Thunderbird 128. Running Manifest V3 add-ons in older versions of Thunderbird is not recommended.\n\n| Sample Extension                   | Description |\n|:-----------------------------------|:------------|\n| addressBooks                       | Uses the `addressbooks`, `contacts`, and `mailingLists` APIs and its dependencies. |\n| apiList                            | Lists all available APIs in different windows: tabs, options, message compose and message display window. It uses the `tabs` API to [inject scripts](https://thunderbird-webextensions.readthedocs.io/en/latest/tabs.html#executescript-tabid-details) and [css](https://thunderbird-webextensions.readthedocs.io/en/latest/tabs.html#insertcss-tabid-details) into the message compose and message display windows. |\n| awaitPopup                         | Opens a blocking popup and await user feedback. |\n| composeBody                        | Uses the `compose` API to access and manipulate the content of the message compose window. |\n| composeScript                      | Uses the `composeScript` API to access and manipulate the content of the message compose window. |\n| dropbox                            | Uses the `cloudFile` (a.k.a. FileLink) API to upload attachments to dropbox. |\n| experiment.activityManager         | Experiment to add a custom event to the *Clear List* button of the Activity Manager. Since the Activity Manager is not supported by WebExtension APIs, the `windows` API cannot be used to detect the window being opened. Instead, this example is using a global window listener to detect and manipulate the Activity Manager. The Experiment defines an `ActivityManager.onCommand` event, which is fired when the *Clear List* button is clicked. This extension also shows how to load a system module, which involves registering a custom `resource://` url.|\n| experiment.openSearchDialog        | Experiment to open the message search dialog. The Experiment has been created with [the Experiment Generator](https://darktrojan.github.io/generator/generator.html).|\n| experiment.prefMigration           | Experiment to migrate preferences from a `nsIPrefBranch` to the WebExtension local storage. |\n| experiment.removeAttachmentsIfJunk | Experiment to remove attachments from the message display area, if the message is classified as junk. The `tabs` and `messageDisplay` APIs are used to detect and manipulate message tabs. |\n| experiment.restart                 | Experiment to add a *Restart* entry to Thunderbird's *file menu* to perform a restart. The `windows` API is used to detect and manipulate the main window. The Experiment defines a `Restart.onCommand` event, which is fired when the custom *Restart* menu item clicked. The background script registers a listener for this event and calls `Restart.execute()`. |\n| indexdb.dexie                      | A simple example how to work with an IndexDB using the the [Dexie library](https://dexie.org/).|\n| indexdb.plain                      | A simple example how to work with an IndexDB directly.|\n| indexdb.sql                        | A simple example how to access an SQLite database stored inside an IndexDB.|\n| mailTabs                           | Uses the `mailTabs` APIs to manipulate the appearance of the main Thunderbird window.|\n| managedStorage                     | Uses `storage.managed` to access data defined by enterprise policies.|\n| menu                               | Uses the menus API to add entries to different menus and shows how to override the context menu of content pages (in popups or tabs).|\n| menuActionButton                   | Shows how to use menu typed action buttons (a compose action button in this case).|\n| messageDisplay                     | Uses the `messageDisplay` and `messageDisplayAction` APIs to show how to add a button to the message header, and how to react when a message is displayed.|\n| messageDisplayScript               | Uses the `messageDisplayScript` API to display a banner with information from the currently selected message along with a button to trigger an action in the background script via `runtime.sendMessage`. |\n| messageDisplayScript.pdfPreview    | Uses the `listAttachments()` and `getAttachmentFile()` functions of the `messages` API to extract attached PDFs and images, and uses the `messageDisplayScript` API to display an inline preview directly in the message window. |\n| optIn                              | Asks the user for extended consent before using the add-on.|\n| quickFilter                        | Uses the `mailTabs`, `menus` and `messages` APIs to add a *Filter* context menu to the message list which can set certain quickfilter settings. |\n| sobriety                           | Shows how the `compose.onBeforeSend` event can be used: Opening a `composeAction` popup in the composition window when an email is about to be send, to request confirmation. |\n| theme_experiment                   | A theme using the theme_experiment API to change the color of the chat icon. |\n\n\nTo run any of the listed extensions, clone or download this repository and either:\n\n* zip the directory of your choice (`manifest.json` should be at the top level of the zip file) and install it like any other Add-On in Thunderbird.\n* select \"Debug Add-Ons\" from the Add-On Manager menu, click \"Load Temporary Add-On\" and select `manifest.json` from your source (or any other file part of your Add-On). Temporary loaded Add-Ons do not need to be zipped.\n\n## Hello World tutorial\n\nThe `hello-world` folder contains the full sources of our [\"Hello World\" Extension Tutorial](https://developer.thunderbird.net/add-ons/hello-world-add-on).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Fwebext-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthunderbird%2Fwebext-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthunderbird%2Fwebext-examples/lists"}