Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
show-titlefalse
titleDetails

The JSON file has the following format.

Code Block
languagejs
{
  "namespace": "...",
  "name": "...",
  "version": "...",

  "script": "...",

  "description": "...",
  "documentation": "...",
  "author": "...",

  "activation": {
    "preserve": false,
    "space": ["...", ...],
    "category": ["...", ...],
    "label": ["...", ...],
    "group": ["...", ...],
    "user": ["...", ...]
  }
}
Section
titleIdentifier

The following JSON attributes identify the userscript.

Tour
marker-column-property-nameTitle
replace-title-with-nametrue
style-classtable=projectdoc-fullwidth[columns=7em,8em,11em,*]
Attribute NameIdentifierTypeTitleShort Description
namespaceStringUserscript Namespace
nameStringUserscript Name
versionSemantic VersionUserscript Version
Section
titleCode

The following JSON attribute references the userscript JavaScript code.

Tour
marker-column-property-nameTitle
replace-title-with-nametrue
style-classtable=projectdoc-fullwidth[columns=7em,8em,11em,*]
IdentifierTypeTitleShort Description
scriptURLUserscript Code URL
Section
titleMetadata

The following JSON attributes provide additional information on the userscript.

Tour
marker-column-property-nameTitle
replace-title-with-nametrue
style-classtable=projectdoc-fullwidth[columns=7em,8em,11em,*]
IdentifierTypeTitleShort Description
descriptionStringUserscript Description
documentationURLUserscript Documentation
authorStringUserscript Author
Section
titleActivation Record

The activation record is defined with the JSON attribute activation, which is a map of attributes.

The activation record provides the following JSON attributes to control in which context the referenced userscript is executed.

Tour
marker-column-property-nameTitle
replace-title-with-nametrue
style-classtable=projectdoc-fullwidth[columns=7em,8em,11em,*]

There is also a control flag for conveniently alter a script without altering the activation record.

Tour
marker-column-property-nameTitle
replace-title-with-nametrue
style-classtable=projectdoc-fullwidth[columns=7em,8em,11em,*]
IdentifierTypeTitleShort Description
preserveBooleanPreserve Activation Record

Allows to control the service to not override an existing activation record. If no activation record exists, none will be created.

This flag allows to alter a userscript without the need to pass in the current values of the activation record.

...