User:Wugapodes/Capricorn

Capricorn is a user script to assist in categorizing redirects. It is the successor to Sam Sailor's which was a modified version of Keφr's sagittarius. The script has been updated to support (nearly) all redirect category templates in Category:Redirect templates as well as allow new page reviewers to mark redirects as patrolled. The organization of templates in the user interface has also been changed to accommodate the additional redirect category templates now supported. For more information on a given template, see Template messages/Redirect pages which is linked to from the bottom right of the interface as WP:TMR.

Installation instructions
Put the line:

in your common.js page, save the page, and bypass your browser cache.

Usage
After installing, when you go to, a green box with a text field and check boxes will appear. Editing the text field will change the target of the redirect. After selecting the checkboxes of redirect category templates you wish to add, click the save button at the bottom left of the green box. This will save the page with an automated edit summary, retarget if needed, and add the templates in the redirect category shell template. Users with the New pages reviewer user right can additionally select the "Mark as patrolled" box to mark the page as patrolled in addition to making the categorization edits.

Limitations

 * Language codes should be added manually to R from alternative language.
 * Former target needs to be added manually to R avoided double redirect.
 * The "Mark as patrolled" box appears regardless of page review status. If the page cannot be reviewed, whether due to lack of permissions or the page not being in the new pages feed, the edits will still be saved.

Bugs

 * Redirects to anchors are not recognized, so it will throw an error at first. Click save again to proceed anyway.

Feedback and bugs
You can report bugs by adding to this section or by [ leaving a message on my talk page].
 * 1) Cannot parse R to TV episode list entry or R from merge (might be fixed in upcoming release)
 * 2) UI appears when looking at a diff of a redirect
 * 3) Feature request: clickable link to redirect target (ideally near the top of the page)

To do

 * r from alternative language
 * Support adding language codes
 * When adding redirect to page with this template populated with language codes, the script adds a new Rcat shell, which it should not do
 * The script still runs of when viewing diffs (as you already know). This can be fixed by not running the script when the url contains  in the query string.
 * Implement a search bar, so it would only show matching checkboxes and presumably removes the headings.
 * Add a save button near the top (after the redirectText input area)
 * Have a button in the top right corner to hide/show the UI.
 * Add an option to the drop-down menu when page is not a redirect

Source files

 * User:Wugapodes/Capricorn.js – Production version
 * User:Wugapodes/CapricornDev.js – Development version; highly unstable
 * User:Wugapodes/Capricorn.css – Style sheet for the interface
 * User:Wugapodes/Capricorn/RedirectTemplates.json – JSON file with Rcat templates, labels, and groupings
 * User:Wugapodes/Capricorn/RedirectAliases.json – Aliases for Rcat templates

Userbox
Adding this template to your userpage will populate Category:Wikipedians who use Capricorn.