Jump to content

User:Odie5533/SnipManager

From Wikipedia, the free encyclopedia
SnipManager
Author(s)User:Odie5533
StatusActive
First releasedNovember 9, 2012; 12 years ago (2012-11-09)
UpdatedAugust 1, 2022
    (2 years ago)
SourceUser:Odie5533/SnipManager.user.js

SnipManager is a script which adds a toolbar to the top of the edit box for holding complex signatures, templates, or other pieces of text. It is compatible with wikEd (and TW/HW).

Features

[edit]
  • Form tooltips support
  • Default value support (using either 'default':'default value here' or 'defeval' which supports javascript functions like getting the date)
  • Multiple forms open at once
  • Prepend and append support (for adding <ref> tags)
  • Ribbon UI
  • Preview templates before adding them to articles

Installation

[edit]

Open your skin's js page and add the following to it:

importScript('User:Odie5533/SnipManager.user.js');

If you use Greasemonkey, just click here.

Translations

[edit]

Willy Weazley has translated SnipManager into Portuguese for use on the Portuguese Wikipedia! You can install the translation by visiting his page at pt:Usuário:Willy_Weazley/SnipManager.user.js.

If you would like to help translate SnipManager to work on a different Wikipedia just send me a PM and I would be glad to assist.

Configuration

[edit]

If you are interested in adding more forms, see User:Odie5533/doctoparameter.py for a script I wrote to help automate the process.

Future ideas

[edit]
  • Display example of templates
    • Tool-tip like display when hovering over the template button
    • Display example at the top of a form
    • Example could be shown either using plain HTML, or a live example using an AJAX preview request
      • On hover, set tooltip timeout, delay 0.5 seconds before displaying. Leaving the button disables the timeout
  • Infobox ribbon tab
    • A panel is displayed that displays the usage for the template and has a button to insert the template (not an entry form like for citations, just for usage and insertion)
    • Could just use the above tool-tip onHover method for infoboxes
  • Add button to bottom right of panels to link to a list of similar templates
    • Later change link to dialog similar to Friendly/Twinkle
  • Auto-generate reference names with author's last name and year
    • Have a button to generate it
    • Or have a button to Add with generated ref name
    • Or automatically generate it as the user fills in the year and last name