Description | Removes missing pages and/or redirects from your watchlist. |
---|---|
Author(s) | Ahecht |
Status | Stable |
Updated | March 31, 2024 (3 months ago) |
Skin support | All |
Source Beta |
User:Ahecht/Scripts/watchlistcleaner.js User:Ahecht/sandbox/Scripts/watchlistcleaner.js |
A userscript to remove missing pages (redlinks), redirects, pages you haven't edited recently, and/or pages you've never edited from your watchlist. The script will prompt to ask which types of pages you want to remove, and how many days of history it should look at, and whether it should skip removing any pages you created. The script can optionally store a backup of the pages it removes at Special:MyPage/Watchlist_backup, which can be used with the Special:RecentChangesLinked tool.
Hint: It's much easier if you get ScriptInstaller, then navigate to User:Ahecht/Scripts/watchlistcleaner.js and click "Install" at the top.
However, here's the manual method:
{{
subst:iusc|User:Ahecht/Scripts/watchlistcleaner.js}}
on
Special:MyPage/common.js or a skin-specific page, like
Special:MyPage/vector.js.When you're on your watchlist, click on the "Clean the watchlist" link on the top toolbar (next to the "Clear the watchlist" link). On some skins, this link may appear in the "Toolbox" or "Tools" menu instead.
The script will prompt you with the following questions:
The script will then fetch items from your watchlist in batches of 500, which is relatively fast, and show any missing pages or redirects that it identifies as potential pages for removal. If you selected the option to find pages you haven't edited recently or pages you never edited, it will look at the remaining pages on your watchlist, one at a time, and examine their revision histories -- this can take a long time on large watchlists. Finally, if you've selected the option to skip removing pages you created, it will examine all pages flagged for removal to see if you made the first edit -- this can be slow if you're removing a large number of pages at once.
Once the script has finished examining pages on your watchlist, it will notify you of how many pages it found to remove, an ask the following questions:
If you don't hit "Cancel" on the first question it will then process the removals in batches of 50 and notify you of the result. If you selected the backup option, it will also display a message showing where the backup was saved.
If you want more details on the script's progress as its running, you can open your browser's debug console ( Help:CONSOLE).