User:Jayvdb/Deletion sorting tool

From Wikipedia, the free encyclopedia

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.

Contents

[edit] Features

  • On an Afd page, a "delsort" tab at the top of on an Afd page. Clicking on that tab 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:

[edit] 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.

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

[edit] Install

1. copy the text below and paste it into your your monobook.js file:

Optional
importScript('User:Quarl/util.js');
importScript('User:Quarl/wikipage.js');
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).

[edit] 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']
}


[edit] 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[)])

[edit] Problems

[edit] Feedback/Questions

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