User:Wugapodes/Capricorn

User script
Capricorn
CapricornScreenshot19August.png
Capricorn interface during category selection
DescriptionEditing redirects
Author(s)Keφr, modified by Sam Sailor, modified by Wugapodes
StatusStable
Updated26 October 2019; 22 months ago (2019-10-26)
Browser supportGoogle Chrome
Skin supportMonobook
Vector
Source

Capricorn is a user script to assist in categorizing redirects. It is the successor to Sam Sailor's Sagittarius+ 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 accomodate the additional redirect category templates now supported. For more information on a given template, see Wikipedia:Template messages/Redirect pages which is linked to from the bottom right of the interface as WP:TMR.

Installation instructionsEdit

Put the line:

mw.loader.load('//en.wikipedia.org/w/index.php?title=User:Wugapodes/Capricorn.js&action=raw&ctype=text/javascript');

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


UsageEdit

After installing, when you go to a redirect page 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.

LimitationsEdit

  • 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.

BugsEdit

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

Feedback and bugsEdit

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 doEdit

  • {{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 &diff 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.

Source filesEdit