Skip to content

Commit

Permalink
use new index (#46)
Browse files Browse the repository at this point in the history
Merge changes for new index and a few fixes.
  • Loading branch information
jobisoft committed Jan 5, 2021
1 parent e7ff41d commit b9284bb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 27 deletions.
6 changes: 4 additions & 2 deletions commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ Update the details of an already defined command.

.. api-member::
:name: [``shortcut``]
:type: (:ref:`manifest.KeyName`)

:type: (string)
:annotation:

An empty string to clear the shortcut, or a string matching the format of the `commands manifest.json key <https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands>`_ to set a new shortcut key. If the string does not match this format, the function throws an error.


.. _commands.reset:
Expand Down
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
# Configure headers
versionwarning_body_selector = 'div[itemprop="articleBody"]'

versionwarning_latest_type = 'tip'
versionwarning_latest_title = 'Note'
versionwarning_latest_type = 'warning'
versionwarning_latest_title = 'Warning'
versionwarning_latest_message = 'This is the API documentation for pre-release versions of Thunderbird. See version {newest} for the current ESR of Thunderbird.'

versionwarning_current_type = 'tip'
versionwarning_current_type = 'note'
versionwarning_current_title = 'Note'
versionwarning_current_indexmessage = 'This is the API documentation for the current ESR of Thunderbird, version {this}. Other available versions are: {other}'

Expand Down
4 changes: 2 additions & 2 deletions how-to/eventListeners.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
==========================
================================
Working with WebExtension Events
==========================
================================

WebExtensions can react on events by attaching a listener. Consider the :ref:`menus.onClicked` event of the menus API:

Expand Down
68 changes: 48 additions & 20 deletions index.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
=============================================
==========================================
Thunderbird WebExtension API Documentation
=============================================
==========================================

These documents assume you already have some familiarity with the WebExtension technology. If not, it is
highly recommended to read our `Guide to MailExtensions`__ or some of the `MDN documentation on the subject`__.

__ https://developer.thunderbird.net/add-ons/mailextensions
__ https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

.. note::
.. hint::

In Thunderbird, all WebExtension API can be accessed through the *browser.\** namespace, as with Firefox,
but also through the *messenger.\** namespace, which is a better fit for Thunderbird.

.. important::

WebExtension APIs are asynchronous, that is, they return a `Promise`__ object which resolves when
ready. See `Using Promises`__ for more information about Promises.

__ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
__ https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises

.. note::

In Thunderbird, all WebExtension API can be accessed through the *browser.\** namespace, as with Firefox,
but also through the *messenger.\** namespace, which is a better fit for Thunderbird.
This documentation includes the following topics:

* `Thunderbird WebExtension APIs`_
* `Firefox WebExtension APIs`_
* :ref:`HowToGuide`
* `Where To Get Help And More Information`_

Thunderbird APIs
================
For any problems or feature requests please `file a bug`__.

__ https://bugzilla.mozilla.org/enter_bug.cgi?product=Thunderbird&component=Add-Ons%3A+Extensions+API




Thunderbird WebExtension APIs
=============================

Thunderbird provides the following messenger related WebExtension APIs, which are sometimes referred to as MailExtension APIs:

Expand Down Expand Up @@ -91,8 +106,8 @@ The documentation for these APIs is generated automatically from the schema docu

__ https://hg.mozilla.org/comm-central/file/tip/mail/components/extensions/schemas/

Firefox APIs
============
Firefox WebExtension APIs
=========================

As Thunderbird is based on Firefox, many of its WebExtension APIs can be used in Thunderbird
as well. The APIs listed in the following table are known to work with Thunderbird.
Expand Down Expand Up @@ -138,23 +153,36 @@ as well. The APIs listed in the following table are known to work with Thunderbi
tabs
windows

.. _HowToGuide:

.. toctree::
:maxdepth: 1
:caption: How To
:caption: How To Guides

how-to/eventListeners
how-to/messageLists
how-to/experiments

Where To Get Help
=================
Where To Get Help And More Information
======================================

- `developer.thunderbird.net`__ for information about building Thunderbird, and creating extensions.
- `Add-ons message board`__ for Thunderbird add-on developers to ask questions and share knowledge.
- `Bugzilla`__ for bug reports and feature requests.
- `developer.mozilla.org`__ for Firefox WebExtensions, on which Thunderbird's are based.
`Thunderbird add-on developer documentation`__
Find information about creating and updating extensions for Thunderbird. Includes getting-started-tutorials and a collection of helpful articles and guides.

`Thunderbird add-on developer community`__
Learn how to get in touch with other add-on developers, to ask questions and to share knowledge.

`Thunderbird sample extensions`__
A collection of MailExtensions, showing how to use Thunderbird WebExtension APIs.

`MDN sample extensions`__
A collection of WebExtensions, showing how to use WebExtension APIs. They probably won't work directly in Thunderbird, but they may provide hints on how to use some of the WebExtension APIs that Thunderbird inherited from Firefox.

__ https://developer.thunderbird.net/
__ https://thunderbird.topicbox.com/groups/addons
__ https://bugzilla.mozilla.org/enter_bug.cgi?product=Thunderbird&component=Add-Ons%3A+Extensions+API
`MDN WebExtension documentation`__
Find general information about the WebExtensions API cross-browser technology used by Firefox and many Chromium-based browsers. Not all information listed there apply to Thunderbird.

__ https://developer.thunderbird.net/add-ons/
__ https://developer.thunderbird.net/add-ons/community
__ https://github.com/thundernest/sample-extensions
__ https://github.com/mdn/webextensions-examples
__ https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions

0 comments on commit b9284bb

Please sign in to comment.