Userscripts for Confluence defines a userscript in form of a descriptor with a reference to the actual script code. The userscript is configured for users by the administration team. Hence users can benefit from additional functions without bothering to validate the fitness of a script for their task by themselves. This makes extending Confluence easier, especially for team members without programming skills. While these additional features can be implemented in form of Confluence apps, many utilities simply rely on a short amount of JavaScript code. These few lines of code are easily shared and boost the productivity of teams. Content Marker |
---|
first-child-fix | true |
---|
id | anatomy-of-userscript |
---|
| The userscript consists of - an
Static Document Link |
---|
document | Userscript Identifier |
---|
label | identifier |
---|
| consisting of Static Document Link |
---|
document | Userscript Namespace |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
, Static Document Link |
---|
document | Userscript Name |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
, and Static Document Link |
---|
document | Userscript Version |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
- a reference to the
Static Document Link |
---|
document | Userscript Code |
---|
to-lower-case | true |
---|
| ( Static Document Link |
---|
document | Userscript Code URL |
---|
label | script |
---|
|
) Static Document Link |
---|
document | Userscript Metadata |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
| , like a Static Document Link |
---|
document | Userscript Description |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
, a reference to further information ( Static Document Link |
---|
document | Userscript Documentation |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
), and an Static Document Link |
---|
document | Userscript AuthorSupport |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
- an activation record (
Static Document Link |
---|
document | Activation Record |
---|
label | ${Short Name} |
---|
to-lower-case | true |
---|
|
) that defines when the userscript is actually executed
The following fragment shows the basic structure of a Static Document Link |
---|
document | Userscript JSON |
---|
label | userscript in JSON |
---|
| . Transclusion |
---|
| Code Block |
---|
language | js |
---|
title | Userscript Descriptor in JSON |
---|
| {
"namespace": "...",
"name": "...",
"version": "...",
"script": "...",
"description": "...",
"documentation": "...",
"author": "...",
"activation": {
...
}
}JSON | ids | anatomy-of-a-userscript |
---|
| |
|
|