User talk:The Transhumanist/WatchlistSorter.js


 * This script is undergoing upgrade, to replace deprecated code. In the meantime, it works.

This script sorts your watchlist by namespace, making it much easier to browse. It is not compatible with Internet Explorer, or its successors. It is not compatible with the "Enhanced recent changes" option in Preferences.

= Script's workshop =
 * This is the work area for developing the script and its documentation. The talk page portion of this page starts at, below.

Description / instruction manual for

 * This script is undergoing upgrade, to replace deprecated code. In the meantime, it works.

This script sorts your watchlist by namespace, making it much easier to browse.

Important: It is not compatible with Internet Explorer, or its successors. It is not compatible with the "Enhanced recent changes" option in Preferences.

Attribution: This is the WatchlistSorter.js script by User:Misza13, with some upgrades. That version had some deprecated code, and Miszal13 had not logged in since Feb 2015, so I undertook to bring the script up to date and further improve it. (I'm in the process of doing that now).

How to install this script
To install this script, add this line to your common.js (or your vector.js) page:



Save the page and bypass your cache to make sure the changes take effect. By the way, only logged-in users can install scripts.

General approach
(general approach goes here)

More specifically, starting at the beginning...

Change log for

 * 2018-01-10
 * Copied User:Misza13/watchlistSorter.js, to begin upgrade
 * Added intro comments
 * Wrapped program in bodyguard function
 * Defined $ and mw aliases
 * Wrapped program in ready event listener/handler
 * Changed == to ===
 * 2018-02-16
 * Added variable declarations for all but one of the variables from throughout the script (none of them had one).
 * Turned assignment statement for "days" into a declaration/assignment statement.

Desired/completed features

 * Completed features are marked with ✅

Legacy JavaScript

 * The following message was posted on User talk:Misza13/watchlistSorter.js:

Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include  needs to be replaced with   or   (depending on use);  all wgGlobalVariables need to be properly gotten with  ; and   needs to be called with. Please see ResourceLoader/Legacy JavaScript for details. Thank you. —  21:47, 19 January 2015 (UTC)

Script dependencies
= Discussions =


 * This is where the actual talk page starts for User:. Please post your discussion threads below...

toggle on/off?
I was wondering about being able to toggle this on and off. Sometimes I have plenty of time to meander through my watchlist and don't mind just paging through until I hit that horizontal line. Other times I want to check certain namespaces. Obviously I can just uninstall/reinstall, but a toggle button would be cool. —valereee (talk) 20:45, 22 June 2021 (UTC)