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

edit
 
Delsorting popup window
  • 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 Wikipedia: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

edit

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

edit

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('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('User:AzaToth/twinkle.js');
importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');
Useful
importScript('User:Lupin/popups.js'); // see Wikipedia: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

edit

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

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

edit
  • 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. ★☆ DUCKISJAMMMY☆★ 07:51, 10 February 2013 (UTC)

Feedback/Questions

edit

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