Panel |
---|
|
Livesearch |
---|
spaceKey | userscripts |
---|
size | large |
---|
additional | page excerpt |
---|
placeholder | Search in this space |
---|
|
|
Browsers render Confluence pages based on HTML when users traverse a Confluence site. The appearance of the page can be altered or additional functions can be applied to these pages by JavaScript code. Confluence users may use
Static Document Link |
---|
document | PDAC:Bookmarklet |
---|
label | bookmarklets |
---|
|
or
Static Document Link |
---|
document | Userscript (Glossary) |
---|
label | userscripts |
---|
|
to execute their own code from within their browser on these pages.
Teams in corporations may need to share these scripts and administration teams may need to prohibit code from uncontrolled sources to be executed in a corporate environment. This is when Userscripts for Confluence enters the stage. Userscripts for Confluence is an app for Confluence Server that allows to administrate JavaScript code to be executed in the browser of Confluence users.
While bookmarklets need to be executed by users explicitly by clicking on links in the browser's bookmarks and classical userscripts are executed when predefined conditions are meet, typically by the use of a browser add-on, Userscripts for Confluence allows to execute scripts stored on the server side. The administration team defines the parameters that activates a particular userscript. A userscript can be executed on a given page
- if a user is member of a certain Confluence group
- if a user's name is explicitly registered
- if the current page
- is part of a certain space
- is part of a space labelled with a certain category
- is labelled with a given label
Or a combination of user and page information. Like
- a page with a given label for users of a given group
- a space identified by a key for a user with a specific name
By providing scripts to be executed in explicitly specified contexts, users of Confluence can implement a number of use cases.
- Hide elements like
- macros from the macro browser
- space blueprints from the space wizard
- page blueprints from the page wizard
- Add page elements
- links or buttons
- divs and paragraphs
Please note that all scripts are executed on the client side, within the browser of the user visiting the page.
Section |
---|
|
Here is information for novice users to get started with Userscripts for Confluence quickly. Display Table |
---|
doctype | topic |
---|
select | Name, Audience|, Short Description |
---|
sort-by | #BREADTH_FIRST |
---|
space-keys | @self |
---|
where | $<Level of Experience>=[Novice] AND $<Type>=[Getting started] |
---|
|
|
Section |
---|
|
The Static Document Link |
---|
document | PDAC1:Userscripts for Confluence |
---|
label | userscript repository |
---|
| provides a collection of sample scripts to be used on Confluence server instances. Display Table |
---|
doctype | app-script |
---|
render-no-hits-as-blank | true |
---|
render-mode | definition |
---|
select | Name, Short Description |
---|
sort-by | Sort Key, Name |
---|
where | $<Type>=[Confluence Userscript] |
---|
space-key | PDAC1 |
---|
|
These scripts are available on Bitbucket with open source licenses. Please adjust these scripts to your specific requirements. |