User:John Vandenberg/Deletion sorting tool


 * This tool is reported to not be working. It needs to be rewritten anyway, for an alternative see these other scripts.

delsort.js is designed to help with WikiProject Deletion sorting. It simplifies the task of "delsorting" an Article for deletion by presenting a window containing the Compact list of delsort lists. When invoked via delsort.js, clicking on a list in the window will automatically list the article on the Deletion Sorting page, and note the delsorting has occurred on the Afd.

Features

 * On an Afd page, "delsort" is located on the top-down menu at the top of the page. Clicking on it will load the Delsorting window.
 * Shortcuts can also be configured to appear on the delsort tab to avoid loading the window.
 * On a Afd log page, such as Today's log and Deletion today, a "Delsort" action is added to each Afd. When an Afd does not have the standard preamble, the Delsort action is not provided.  To use, click on the "Delsort" action displayed below:

Dependencies
The code has been written using the Twinkle framework, so that must be installed first. In addition, Quarl's wikipage.js has been used for the Afd log page feature (see above for description).

The code to add the menu item depends on User script "Add LI menu".

Install
1. copy the text below and paste it into your current skin file, which is vector.js by default:


 * Optional:

importScript('User:Quarl/util.js'); importScript('User:Quarl/wikipage.js'); (wikipage conflicts with https log-ins)


 * Mandatory:

importScript('WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('WikiProject User scripts/Scripts/Add LI menu/css'); importScript('User:AzaToth/twinkle.js'); importScript('WikiProject Deletion sorting/delsort.js');


 * Useful:

importScript('User:Lupin/popups.js'); // see Tools/Navigation popups

2. Save the page

3. Refresh your browser and bypass your cache (hit Control-Shift-R in Firefox or Control-F5 in Internet Explorer).

Configuration
To configure the way the tool works, copy the text below, and paste it in your monobook.js:

DelsortConfig = { debugLevel : 0, watchDelsortedLists : 1, watchDelsortedAfd : 1, shortcuts : ['Authors','Australia','Lists'] }

Internals

 * Delsorting will not occur if the tool can not verify that the name of the article is correct, and the article still exists. This is to prevent delsorting interfering with an Afd after a speedy close has deleted the article.  The article name detection logic currently uses the Afd name, so it can be confused if a page for ABC is listed on Afd as Wikipedia:Articles for deletion/DEF.  The result is the delsort will report an error.  Additional nominations of the same article is supported, provided the suffix is recognised, using the following regular expression which allows the formats (2nd nomination) or (second nomination), and N may be a capital.

([(]([0-9]+..|[a-z]+) [Nn]omination[)])

Problems

 * It doesn't work in Google Chrome. John Vandenberg (chat) 23:04, 10 February 2011 (UTC)


 * Does not support the Afd naming that has been a feature of Railpage Australia, i.e. Articles for deletion/Railpage Australia (5) — Preceding unsigned comment added by Marcus Qwertyus (talk • contribs) 01:03, 15 August 2011 (UTC)


 * This script is no longer working on the latest nightly version of Firefox, which means that it won't work in future stable builds. The error message in the console is this. Logan Talk Contributions 15:51, 18 November 2011 (UTC)


 * As pointed out on a post to Vandenberg's talk page, clicking on "delsort" in the menu does nothing. I get "Exception is not defined" on line 248 in Firefox's Web Console.  Bgwhite (talk) 05:49, 4 July 2012 (UTC)

User:Fox Wilson has created a new script see User:Fox Wilson/delsort.js. &#9733;&#9734; DUCK IS JAMMMY &#9734;&#9733; 07:51, 10 February 2013 (UTC)
 * The option does not appear at all on Chrome with the MonoBook skin. - a boat   that can float!  (watch me float!)  12:13, 21 November 2012 (UTC)

Feedback/Questions
Please leave them on my talk page or at WP:DELSORT