User:Eejit43/scripts/redirect-helper
{{User:Eejit43/script-documentation
| description-short = User script to easily manage redirects
| description = This user script enables convenient editing and creation of redirects. Although it serves a similar purpose to Wugapodes' "Capricorn" and its earlier versions, this script is completely different. It has been redesigned with enhanced user-friendliness and incorporates new features.
| usage = This script's editor can be accessed in the following ways:
- Using the automatically set up dialog on redirect pages
- Can be started when clicking "Create redirect" on a nonexistent page
- Can be started by clicking "Redirect page" in the "More"/"Tools" menu on an existing article
| configuration = This script can be configured via a {{code|window.redirectHelperConfig}} object to your common.js. This takes the following form:
window.redirectHelperConfiguration = {
createdWatchMethod: 'nochange' | 'preferences' | 'unwatch' | 'watch',
};
By default, redirects that are created will use the {{code|preferences}} watchlist change method, following the {{myprefs|Watchlist|Watched pages|check={{int:tog-watchdefault}}}} configuration field. This can be changed through {{code|createdWatchMethod}} to either {{code|nochange}} (don't change watch settings for the created page), {{code|unwatch}} (unwatch the created page), or {{code|watch}} (watch the created page).
For example, to not change watch settings for created pages, add the following to your common.js:
window.redirectHelperConfiguration = {
createdWatchMethod: 'nochange',
};
This can be overridden manually through the UI in the form of a checkbox.
| changelog =
- {{start date and age|2025|03|10}}: Support adding sort keys to categories.
- {{start date and age|2024|12|22}}: Support the modification of created pages' watchlist status via config option and UI checkbox.
- {{start date and age|2024|12|12}}:
- Support internationalization of "#REDIRECT" text
- Make edit summary link correct across projects.
- {{start date and age|2024|12|04}}: Support creating and editing redirects while editing pages.
- {{start date and age|2024|09|12}}: Fix falsely marking target as changed when only the first letter capitalization was fixed.
- {{start date and age|2024|09|04}}: Suggest DEFAULTSORTs for redirects tagged with {{tl|R from band member}}.
- {{start date and age|2024|09|03}}: Suggest DEFAULTSORTs for more redirects.
- {{start date and age|2024|08|29}}: Correctly handle unnamed template parameters without preceding parameters.
- {{start date and age|2024|08|26}}: Preserve usage of {{tl|Authority control}}.
- {{start date and age|2024|07|15}}: Add very basic dark mode support.
- {{start date and age|2024|05|16}}: Prevent all redirect rcat templates from showing up when searching "with possibilities".
- {{start date and age|2024|04|19}}: Add more informative ("add"/"removed" alongside "changed") edit summaries.
- {{start date and age|2024|04|18}}: Support redirects to television episode anchors.
- {{start date and age|2024|04|17}}:
- Support the addition of rcat redirects with possibilities.
- Implement auto-fix feature for certain warnings.
- {{start date and age|2024|03|20}}: Add check for missing required tag parameters.
- {{start date and age|2024|03|19}}:
- Move preview button to submit section, preview all information instead of just templates.
- Support editing redirect categorization template arguments for templates that have TemplateData.
- {{start date and age|2024|03|04}}: Add button to suggest DEFAULTSORTs in certain situations.
- {{start date and age|2024|02|08}}: Handle redirects to surname lists.
- {{start date and age|2024|02|07}}: Fix redirects to categories adding category instead of linking to it.
- {{start date and age|2024|01|30}}: Ignore italic text in section names for redirect target.
- {{start date and age|2024|01|29}}:
- Add a check for {{tl|R with Wikidata item}} without being linked to a Wikidata item and vice versa.
- Add "Show changes" button to show the diff of the current changes to the redirect.
- Move the preview templates button to a layout with the tag input element.
- {{start date and age|2024|01|28}}: Add a field for modifying redirect default sort key (DEFAULTSORT).
- {{start date and age|2024|01|27}}: Add a field for modifying redirect categories.
- {{start date and age|2024|01|26}}:
- Change background color to gray and switch styles to be applied through classes/ids so they can be customizable.
- Add support for viewing categories in "Preview templates" menu.
- {{start date and age|2024|01|25}}: Add "Preview templates" button to show how the selected redirect categorization templates would appear on the current page.
- {{start date and age|2024|01|24}}: Add checks for using protection redirect categorization templates unnecessarily.
| skin-support = {{User:Eejit43/script-documentation/skin-support|vector-2022=yes|vector=yes|timeless=yes|monobook=yes|modern=yes|minerva=yes|cologne-blue=yes}}
| source-multiple = true
| released = {{start date and age|2023|05|17}}
| updated = {{start date and age|2025|05|28}}
}}