Page tree

 

A graphical tool to create, search, and edit userscripts.

Type
Since
1.0

The Userscript Admin Tool provides a simple user interface to create, search, and edit userscripts installed on the local Confluence server.

From your idea to implementation on your Confluence server in a flash.

Userscript

A userscript is configured with the following properties.

  • Identifier - Identifies a userscript uniquely within a userscript service.
    • Name - A name identifies a userscript within its namespace.
    • 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.
    • Version - A version uniquely identifies a userscript within its name and namespaces.
  • Code - Information relating to the Userscript code.
    • Code URL - The URL to the JavaScript code of the userscript.
  • Metadata - Information relating to the Userscript.
    • Description - A short description about the purpose of the userscript.
    • Documentation - A reference to the online documentation of the userscript.
    • Support - Provides information about the support of the userscript.
  • Activation - Defines the context in which a userscript is actually executed.
    • Label - A script is activated if the user is viewing a page, tagged with a given label.
    • Space - A script is activated if the user is viewing resources on a specific space.
    • Category - A script is activated if the user is viewing resources on space tagged with a given category.
    • Group - A script is activated if the user is member of a specified group.
    • User - A script is activated if the user is explicitly referenced by its name.

User Interface

The tool provides two functions.

  • The search tool allows to find existing userscripts
  • The editor allows to create or edit userscripts

Userscript Search

Installed userscripts can be found with the Userscript Search Dialog.

Screenshot shows the Userscript Search Dialog with one hit.

Per default the search dialog will open on clicking the shortcut 'qq'.

By clicking on a row of the hitlist the Userscript Editor Dialog opens.

The Create Button opens the Userscript Editor Dialog with an empty form. 

Userscript Editor

The editor renders the property of the selected userscript.

Screenshot showing the Userscript Editor Dialog with a loaded Userscript.

With the editor the script may be altered or deleted.

You may also clear the form and create a new userscript. If the new userscript should be based on the userscript shown, click Reuse Form. Reusing the form detaches the current userscript and allows to edit the information and save a new userscript.

The find button allows to specify the namespace and name and retrieve the latest version for the userscript. Note that the form will be populated with the information form that userscript, overriding the current field values in the form.


Details

More information on using this tool.

Styling

The highlighting of a row on hover in the search results can be configured via a style sheet.

table.aui > tbody > tr.userscript-table-row.highlight {
  background-color: aliceblue;
}

To override the default, be more specific with .userscript-highlight.

table.aui > tbody > tr.userscript-table-row.highlight.userscript-highlight {
  background-color: darkblue;
  color: white;
}



Resources

More information on this topic is available by the following resources.

Managing Userscripts
A short introduction to manage (add, alter, remove) userscripts with the Userscripts for Confluence App.