User:Ale jrb/Scripts

I have many random .js pages here on Wikipedia, hundreds of random .js pages spread out over other wikis, and thousands of them on my test wiki at home. Most of them are broken, rubbish or utterly useless (or some combination of all three) - but when I have one that I actually start using, I'll put it here.

NB. Any script I make that edits automatically will link here in its edit summary. This is for three very good reasons:
 * It lets me track down problems more easily.
 * It helps other people, who might find it useful, locate it.
 * It's good for my ego :-)

If you have any feedback, questions, comments or suggestions, please let me know on my talk page.

igloo
My browser-based, JavaScript anti-vandalism program is in testing. Learn more.

CSDH (CSD Helper)
A script that helps admins delete speedy deletions much more quickly, including changing rationales, and assists everyone in declining/contesting speedy deletions and changing speedy deletions to PRODs.
 *  importScript('User:Ale_jrb/Scripts/csdhelper.js'); //User:Ale_jrb/Scripts 
 * Vars: (there are a large number of configuration settings - all are optional)
 * var notifyByDefaultDel = true/false; --- whether to automatically check the 'notify user' box when changing a speedy deletion rationale
 * var notifyByDefaultDec = true/false; --- whether to automatically check the 'notify user' box when declining a speedy deletion
 * var notifyByDefaultPrd = true/false; --- whether to automatically check the 'notify user' box when converting a speedy deletion to a PROD
 * var notifyLimit = 1-15; --- how many revisions to check for the user who tagged the page
 * var redirectAfterDel = URL [as string]; --- the URL to redirect to after deleting a speedy page (default: CSD category)
 * var overwriteDeclineReasons = true/false; --- whether to overwrite the existing decline reasons with the user-provided array (if false, user options will be appended)
 *  var myDeclineReasons = new Array(['A', 'A dec reason.'], ['B', 'B dec reason.'], ['C', 'C dec reason.']);  -- an array of additional decline reasons in the form ['code', 'description'] . Separate options with a comma, as shown.
 *  var myDeleteReasons = new Array(['A', 'A del reason.'], ['B', 'B del reason.'], ['C', 'C del reason.']);  -- an array of additional deletion reasons in the form ['code', 'description'] . Separate options with a comma, as shown.
 * var myDeclineListing = '%CRITERION% - %REASON%'; --- the string to use in the drop-down selection box. Parameters include: %CRITERION% (criterion specified), %REASON% (reason specified).
 * var myDeclineSummary = 'Text - %REASON%'; --- the string to use as the edit summary for 'normal' decline cases (invalid criterion). Parameters include: %ACTION% (declined/contested depending on sysop), %CRITERION% (criterion specified), %REASON% (reason specified).
 * var myDeclineSummarySpecial = 'Test - %REASON%'; --- the string to use as the edit summary for 'special' decline cases (no criterion provided etc). Parameters include: %ACTION% (declined/contested depending on sysop), %REASON% (reason specified).

CSD Check
A tiny script that cleans the deletion reasons, so you aren't distracted by the Wiki-code. That is all. (I think sysop.js used to do this. Then it stopped. I have no idea about now.)
 *  importScript('User:Ale_jrb/Scripts/csdcheck.js'); //User:Ale_jrb/Scripts 

Status Check
A small script that displays whether a user is on- or offline when viewing their user page, user talk page and contributions. Based on most recent action (edit or log).
 *  importScript('User:Ale_jrb/Scripts/statusCheck.js'); //User:Ale_jrb/Scripts 
 * Vars:
 * var offlineAfter = [integer]; --- the number of seconds after which someone is considered 'offline' (default: 15 * 60 seconds = 15 minutes)
 * var statCloseOnClick = true/false; --- whether the on/offline message should disappear when clicked on (default: true)
 * var statPosition = new Array(left as [integer], top as [integer], [optional] right as [integer], [optional] bottom as [integer]); --- position of the status message on the screen (default: left: 20, top: 600). If provided, right will supercede left and bottom will supercede top.

waLib
My Javascript library. Simplifies or automates AJAX calls, GUI manipulation and the Mediawiki API. Could be useful for coders - I use it for all my scripts. To use, place the import code somewhere in your file (at the top if using procedural code) and you can call its functions.
 *  importScript('User:Ale_jrb/Scripts/waLib.js');