Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Document Properties Marker
doctypeglossary-item
overridefalse
Short DescriptionA userscript is JavaScript code plus metadata that is executed on a web page rendered in a user's browser.
NameUserscripthide
Short Name
Parent
Parent Property
property-nameName
hide
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyAudience
empty-as-nonetrue

Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
property-restrict-value-rangetrue
propertyCategories

Tags
Tag List
propertyTags

Flagshide
Iteration

Iteration
valuereleased

hide
Type
Name List
doctypeglossary-item-type
render-no-hits-as-blanktrue
property-restrict-value-rangetrue
propertyType

Abbreviation
Display Property
property-nameShort Name
hide
Linguistic Information
Relation

Name List
doctyperelation
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
namesUserscripts for Confluence
propertyRelation

mat:Type
Related Terms
Name List
doctypeglossary-item
render-no-hits-as-blanktrue
render-list-as-comma-separated-valuestrue
propertyRelated Terms
hide
Sort Keyhide
Section
show-titlefalse
titleDescription

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-fixtrue
idanatomy-of-userscript

The userscript consists of

  1. an 
    Static Document Link
    documentUserscript Identifier
    labelidentifier
    consisting of
    Static Document Link
    documentUserscript Namespace
    label${Short Name}
    to-lower-casetrue
    Static Document Link
    documentUserscript Name
    label${Short Name}
    to-lower-casetrue
    , and 
    Static Document Link
    documentUserscript Version
    label${Short Name}
    to-lower-casetrue
  2. a reference to the 
    Static Document Link
    documentUserscript Code
    to-lower-casetrue
    (
    Static Document Link
    documentUserscript Code URL
    labelscript
    )
  3. Static Document Link
    documentUserscript Metadata
    label${Short Name}
    to-lower-casetrue
    , like a 
    Static Document Link
    documentUserscript Description
    label${Short Name}
    to-lower-casetrue
    , a reference to further information (
    Static Document Link
    documentUserscript Documentation
    label${Short Name}
    to-lower-casetrue
    ), and an 
    Static Document Link
    documentUserscript
Author
  1. Support
    label${Short Name}
    to-lower-casetrue
  2. an activation record (
    Static Document Link
    documentActivation Record
    label${Short Name}
    to-lower-casetrue
    ) that defines when the userscript is actually executed

The following fragment shows the basic structure of a

Static Document Link
documentUserscript JSON
labeluserscript in JSON
.

Code Block
languagejs
titleUserscript Descriptor in JSON
Transclusion
documentUserscript JSON
idsanatomy-of-a-userscript
{ "namespace": "...", "name": "...", "version": "...", "script": "...", "description": "...", "documentation": "...", "author": "...", "activation": { ... } }

Section
titleList of related Terms
Table Merger
Tour-by-Property
render-modedefinition
render-classesrelated-terms-property-table, tour-by-property, related-terms-list
propertyRelated Terms
Display Table
doctypeglossary-item
render-no-hits-as-blanktrue
render-modedefinition
render-classesrelated-terms-list-table, display-table, related-terms-list
where$<Related Terms>=[${Name}]
exclude-selftrue

...

Section
titleReferences
Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
marker-column-property-nameTitle
replace-title-with-nametrue
TitleShort Description


Section
titleResources

More information on userscripts:

Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
marker-column-property-nameTitle
replace-title-with-nametrue
TitleShort Description

System Link
fileUserscript
system-idwikipedia-en
titleWikipedia: A userscript is a program, usually written in JavaScript, for modifying web pages to augment browsing.

Entry on Userscript on Wikipedia.
Userscript (Datatype)