mirror of
https://github.com/zotero/zotero.git
synced 2026-10-06 02:50:03 +00:00
Fix JSDoc for preferencePanes.js
This commit is contained in:
parent
8a76aac83f
commit
cf8dd78a4a
1 changed files with 18 additions and 10 deletions
|
|
@ -23,8 +23,16 @@
|
|||
***** END LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @namespace Zotero
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Manages preference panes.
|
||||
*
|
||||
* @memberof Zotero
|
||||
*/
|
||||
Zotero.PreferencePanes = {
|
||||
builtInPanes: Object.freeze([
|
||||
|
|
@ -104,19 +112,19 @@ Zotero.PreferencePanes = {
|
|||
* shuts down.
|
||||
*
|
||||
* @param {Object} options
|
||||
* @param {String} options.pluginID ID of the plugin registering the pane
|
||||
* @param {String} options.src URI of an XHTML fragment, optionally relative to the plugin's root
|
||||
* @param {String} [options.id] Represents the pane and must be unique. Automatically generated if not provided
|
||||
* @param {String} [options.parent] ID of parent pane (if provided, pane is hidden from the sidebar)
|
||||
* @param {String} [options.label] Displayed as the pane's label in the sidebar.
|
||||
* @param {string} options.pluginID ID of the plugin registering the pane
|
||||
* @param {string} options.src URI of an XHTML fragment, optionally relative to the plugin's root
|
||||
* @param {string} [options.id] Represents the pane and must be unique. Automatically generated if not provided
|
||||
* @param {string} [options.parent] ID of parent pane (if provided, pane is hidden from the sidebar)
|
||||
* @param {string} [options.label] Displayed as the pane's label in the sidebar.
|
||||
* If not provided, the plugin's name is used
|
||||
* @param {String} [options.image] URI of an icon to be displayed in the navigation sidebar, optionally relative to
|
||||
* @param {string} [options.image] URI of an icon to be displayed in the navigation sidebar, optionally relative to
|
||||
* the plugin's root. If not provided, the plugin's icon (from manifest.json) is used.
|
||||
* @param {String[]} [options.scripts] Array of URIs of scripts to load along with the pane, optionally relative to
|
||||
* @param {string[]} [options.scripts] Array of URIs of scripts to load along with the pane, optionally relative to
|
||||
* the plugin's root
|
||||
* @param {String[]} [options.stylesheets] Array of URIs of CSS stylesheets to load along with the pane, optionally
|
||||
* @param {string[]} [options.stylesheets] Array of URIs of CSS stylesheets to load along with the pane, optionally
|
||||
* relative to the plugin's root
|
||||
* @param {String} [options.helpURL] If provided, a help button will be displayed under the pane
|
||||
* @param {string} [options.helpURL] If provided, a help button will be displayed under the pane
|
||||
* and the provided URL will open when it is clicked
|
||||
* @return {Promise<string>} Resolves to the ID of the pane if successfully added
|
||||
*
|
||||
|
|
@ -168,7 +176,7 @@ Zotero.PreferencePanes = {
|
|||
/**
|
||||
* Called automatically on plugin shutdown.
|
||||
*
|
||||
* @param {String} id
|
||||
* @param {string} id - ID of the pane to unregister, as returned by `Zotero.PreferencePanes.register()`
|
||||
*/
|
||||
unregister: function (id) {
|
||||
this.pluginPanes = this.pluginPanes.filter(p => p.id !== id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue