Page tree

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

 

A representation of a userscript resource in JSON format.

Since
1.0

This datatype defines the syntax and semantics to encode a userscript in the JavaScript Object Notation (JSON).

JSON is a widely used format to pass representations of entities to and retrieve entities from REST services.

The JSON file has the following format.

{
  "namespace": "...",
  "name": "...",
  "version": "...",

  "script": "...",

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

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

Identifier

Identifier Type Name Short Description
namespace
Userscripts are organized in namespaces. This way scripts of different vendors may have the same name, but are still distinguishable by their unique namespace.
name
A name identifies a userscript within its namespace.
version
A version uniquely identifies a userscript within its name and namespaces.

Code

Identifier Type Name Short Description
scriptURL

Metadata

Identifier Type Name Short Description
descriptionURL

documentation


author


Activation Record

The activation record is defined with the property activation.

The activation record provides the following properties to control in which context the userscript is executed.

Identifier Type Name Short Description
space


category


label


group


user


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

Identifier Type Name Short Description
preserveBoolean

  • No labels