User talk:Writ Keeper/Scripts/cuStaleness.js

Testers

 * ​—DoRD (talk)​ 11:23, 28 June 2017 (UTC)
 * - GABgab 20:29, 28 June 2017 (UTC)
 * - Berean Hunter   (talk)  11:26, 3 July 2017 (UTC)
 * - Callanecc (talk • contribs • logs) 03:37, 6 July 2017 (UTC)

Bugs, comments, notes

 * So far, everything seems to be working as expected. Can this be extended to, skipping the account creation date part, of course? ​—DoRD (talk)​ 12:44, 28 June 2017 (UTC)
 * Yup, the script already can handle IP addresses; just need to add the CSS classes to the template. I'll do that now. Writ Keeper &#9863;&#9812; 13:15, 28 June 2017 (UTC)
 * Quick bugfix needed, but should be working now. Writ Keeper &#9863;&#9812; 13:27, 28 June 2017 (UTC)
 * Thanks, it looks to be working as expected. ​—DoRD (talk)​ 13:53, 28 June 2017 (UTC)

— Berean Hunter   (talk)  13:31, 3 July 2017 (UTC) , would you please remove the 10 account limiter or alternatively have an alternate version that has no limiters? I'm doing a lot of clicking due to them. Every time a page is refreshed, I'm having to do it all over again. An active case example is Sockpuppet investigations/Xingzuin and as new socks are added lower in the page, I'm having to re-evaluate every time and those clicks are adding up fast. I'm trying to nurse tennis elbow in my right arm so this would help me a great deal. — Berean Hunter   (talk)  13:27, 3 August 2017 (UTC) — Berean Hunter   (talk)  14:13, 3 August 2017 (UTC)
 * I've added a limiter that will halt the processing at 10 users at once. After 10, it'll instead write a notification in red; this notification can be clicked to process the next 10, and so on. This is so that, for huge cases or archive pages, the script doesn't explode your computer by truing to evaluate hundreds of socks at once. The choice of 10 is fairly arbitrary; I figure that should give enough room that most actual case pages are covered, but it can be increased or decreased based on whatever people are feeling. I can actually make it user-customizable too, if that's a thing people want. Writ Keeper &#9863;&#9812; 15:42, 28 June 2017 (UTC)
 * , thanks so much for your hard work on this. It's working smoothly so far. GABgab 01:38, 29 June 2017 (UTC)
 * Haha, no worries! I love writing little scripts like this. Writ Keeper &#9863;&#9812; 13:18, 29 June 2017 (UTC)
 * I've been using this with no detected problems so far. It works great, is very handy and falls into the category of things that I wish that we would have had for years. Great work Writ Keeper!
 * Or, make it a variable that can be set in individual monobook/vector/common.js files...? ​—DoRD (talk)​ 13:33, 3 August 2017 (UTC)
 * Yup, DoRD, that's exactly what I just did. Berean Hunter, I didn't disable the check completely, but I made it so that you can increase the limit: just go to the .js page where you added the cuStaleness script, and right above the line where you added the script, put the following code: . You can change the 100 to be as high as you want it to be, and that number will become how many users the script will process before it halts. (I am very reluctant to remove the limiter entirely.) Writ Keeper &#9863;&#9812; 13:40, 3 August 2017 (UTC)
 * Perfect. No slowness or ill effects seen but I'm using 8G RAM. Not sure what affects performance here. Thank you very much.
 * The concern isn't so much your computer's performance, it's more the network performance--I'm sure the Wikimedia servers are more than robust enough to serve hundreds of API calls at once for a particularly big case page, but it's not a thing I necessarily want to make the default behavior. Also, if people browse Wikipedia on their phone over mobile data (which I have been known to do), all those extra API calls are extra data traffic that they might not want, though even that many calls shouldn't actually add too muchdata consumption, since each individual call is pretty small. Honestly, it just comes down to a coding style thing, I think. Glad to know that the customizability helps! Writ Keeper &#9863;&#9812; 14:19, 3 August 2017 (UTC)

Only get "last edit" sometimes?
Sometimes I get an indication of when the account's last edit was (created 2021-6-24, last edit 2022-1-28, not stale) and sometimes it leaves that out (created 2022-1-27, not stale). Those two examples are both from WP:Sockpuppet investigations/Pri2000 What's causing that? -- RoySmith (talk) 17:23, 28 January 2022 (UTC)
 * Hey, RoySmith, that's because the script runs on "lazy mode" by default--if the account it's looking at is already non-stale by virtue of its creation date, then the script will decide to skip checking the contribs, to save API cycles. You can disable this functionality and have it always run the contribs check by putting  into your common.js, right below (and in the same way as) the   field. HTH, Writ Keeper &#9863;&#9812; 18:01, 28 January 2022 (UTC)
 * Cool, thanks. -- RoySmith (talk) 18:34, 28 January 2022 (UTC)

Add info on whether a user is blocked?
In addition to the dates, could this add a message if the user is blocked? I think that would be helpful. 0x Deadbeef 12:35, 10 September 2022 (UTC)


 * Turn on "Strike out usernames that have been blocked" under Gadgets in your preferences. -- RoySmith (talk) 14:27, 10 September 2022 (UTC)

cuStaleNormalizeUsername
The case conversion in this function is inconsistent with the case conversion that MediaWiki does. See. This should use something like new mw.Title(trimmed).getMain instead. A manifestation of this issue can be found at Sockpuppet investigations/あすぺるがあすぺしゃりすと, where some accounts are marked as "account does not exist" when they in fact do. 0x Deadbeef →∞ (talk to me) 03:40, 10 December 2023 (UTC)
 * The enforcement of capitalisation extended to a bunch of new languages with the introduction of PHP 7.4 & Unicode 11 a couple of years ago. Those usernames that started with a lowercase in the affected languages were forcibly renamed. T292552 Cabayi (talk) 12:20, 11 December 2023 (UTC)