importScript('User:Shubinator/DYKcheck.js'); //DYKcheck tool
</syntaxhighlight>
==Features==
===Prose length===
DYKcheck calculates the prose of the article. This part is a slightly modified version of the [[User_talk:Dr_pda/prosesize.js|prosesize tool]]. It does not count tables, block quotes, headers, images, captions, templates, infoboxes, edit buttons, categories, references, lists, superscripts, or reference link numbers like <sup>[1]</sup>. The text is highlighted so the user can see what's being counted as prose. (In older versions of Internet Explorer, headers may be highlighted even though they aren't counted as prose.)
===Article creation===
DYKcheck finds who created the article and the date it was created. The only limit is if Wikipedia's servers have the information. For example, information on the creation of the [[Main Page]] is not available. In that case, DYKcheck will return the first edit recorded in Wikipedia's servers. The tool will also see if the article was created as a redirect. If so, the next three revisions of the article will be checked to see when it was made into a real article. After the userspace move and expansion check are also calculated, DYKcheck finds the latest of the three dates and compares it to today's date. The tool shows if the latest date is not within the past 10 days. Number of days is rounded down in favor of nominators.
===Moves from userspace===
DYKcheck scans the last 100 edits for a move from userspace. The script will find the last move from userspace if the article has been moved multiple times.
===Stub tags===
The tool looks for stub tags on both the article page and its talk page.
===DYK and ITN===
DYKcheck looks at the talk page of the article for the <nowiki>{{dyktalk}} and {{ITNtalk}}</nowiki> templates.
===Inline citations===
DYKcheck searches for inline citations (with <nowiki><ref> tags</nowiki>) and notes if there aren't any.
===Dispute and deletion tags===
DYKcheck scans the article for various tags. If the article is at [[WP:AFD|Articles for Deletion]], the script gives a link to the deletion discussion. Other tags are found by their images (full list is [[:File:Text_document_with_red_question_mark.svg|1]], [[:File:Question book-new.svg|2]], [[:File:Ambox content.png|3]], [[:File:Ambox style.png|4]], [[:File:Imbox style.png|5]], [[:File:Copyright-problem.svg|6]], [[:File:Copyright-problem paste.svg|7]], [[:File:Ambox globe content.svg|8]], [[:File:Unbalanced scales.svg|9]], [[:File:Ambox scales.svg|10]], [[:File:Ambox_contradict.svg|11]], [[:File:Ambox warning orange.svg|12]], [[:File:Acap.svg|13]]). [[WP:CSD|Speedy deletion]] tags are also detected.
===Expansion===
DYKcheck finds the start of expansion date, assuming the article is now 5x expanded. It checks the last 500 edits with a [[binary search algorithm]]. Because of this, DYKcheck assumes that the article has more or less been always increasing in size. Minor fluctuations won't matter, but if the article crosses the 1x line multiple times, the tool can get confused. If it does get confused, it will err against the nominator; it will never show a more recent date for 1x than the actual. Therefore, reviewers should '''<span style="color:crimson;">always</span>''' check expansion manually if DYKcheck says the article hasn't been expanded 5x. This part of the scan takes the longest because up to nine requests from the server are made sequentially.
===Rapid-fire mode on T:TDYK===
{{hatnote|This section is currently not relevant. It describes DYKcheck behavior from the time before nomination templates, when the text of all nominations was on a single page.}}
DYKcheck can scan individual nominations from the nominations page ([[T:TDYK]]). For each nomination it can process multiple articles and multiple hooks. Hook length is calculated without the leading ''"... "'', but including ''"that"'' and ''"?"''. If "''(pictured)''" is included in the hook, it isn't counted, but any phrases along with it are (for example, ''(cat pictured)'' would add four characters to the hook length). The phrase "''(pictured)''", including the parentheses, must have the same formatting throughout (in other words, completely italicized) for DYKcheck to pick up on it. The hooks are detected by ''"... that "'' at the start and ''"?"'' at the end. The tool will not get thrown off by stray question marks in the nomination comments, but it will get thrown off by stray ''"... that "''s, and stray question marks inside the hooks. Since DYKcheck finds the end of the hook by the question mark, it does not process multiple sentence hooks.<br />
Since all of the nominations have the article titles as subsubheadings, DYKcheck searches for subsubheadings to get the individual nominations. If there are any subsubheadings that don't correspond to nominations, the tool will get confused. Getting the tool to do multiple article noms was actually trickier than I thought it would be. I could get it to find the article titles just fine. But when I iterated through them, the tool went haywire. It turns out that each article was being processed concurrently, resulting in nothing getting done. This didn't (and doesn't) matter for one article, because even though multiple pieces (for example, checking the talk page and checking for userspace moves) are being processed at the same time, they don't conflict with each other. With multiple articles though, each is trying to use the same methods. My solution was to have the articles be processed in order. A function checks when one article is finished and lets the next one go.<br />
By default, DYKcheck only checks for expansion if the string ''"5x expan"'' shows up in the nomination. This saves resources, because the expansion check is by far the most costly. This is a configurable option (see below), so you can have it always check for expansion if you wish.<br />
DYKcheck can also jump to nominations in sections of T:TDYK. If your URL shows a hash, DYKcheck will go to the section specified. For example, if the URL says ''<nowiki>http://en.wikipedia.org/wiki/T:TDYK#Older_nominations</nowiki>'', the tool will start processing nominations from Older nominations. This makes it easier to jump around on a page with more than 200 noms. It also means that if you make an edit to a nomination, DYKcheck will pick up at that nom.<br />
Since T:TDYK is such a long page, it would be tedious to keep scrolling up and down to hit the "DYKcheck" button in the toolbox. DYKcheck's solution is to fix the sidebar in place if you're on T:TDYK. This is another configurable option (see below), so if you hate it, or love it and want to use it all the time, it's easy to change the settings. It looks best if you have a big screen. Thanks to [[User:Omegatron|Omegatron]] and the meta [[m:Help:User_style/floating_quickbar|user styles page]] for the sidebar code.
==Options==
|