User talk:Ale jrb/Scripts/userhist.js

Collision with User:Markhurd/hidetopcontrib.js
your latest edit to this script seems to have caused a conflict with User:Markhurd/hidetopcontrib.js, so that neither of them work if both are enabled. ansh 666 16:58, 12 April 2018 (UTC)
 * Indeed, thanks for the catch! It seems that increasing 'b' by one does the trick.  I want to test around a bit more, but I think it would work to 1. add a class to the "all" links added by userhist and then 2. add a line to hidetopcontrib a la revdel to increase the variable accordingly. ~  Amory  (u • t • c) 17:29, 12 April 2018 (UTC)
 * Does importing User:Amorymeltzer/vector.js work for you? It works for me, but I want to confirm before I go changing these two scripts. ~  Amory  (u • t • c) 17:36, 12 April 2018 (UTC)
 * It works when I put it in my vector.js but not my common.js (which was where I'd had them before), but that's probably because it's your vector.js. Thanks for looking into it! ansh 666 18:51, 12 April 2018 (UTC)
 * Should work now. ~ Amory  (u • t • c) 20:12, 12 April 2018 (UTC)
 * Yes it does, thanks! ansh 666 20:50, 12 April 2018 (UTC)

Using wgRelevantUserName
Hi, I hope you don't mind, but I just made this minor edit, which avoids throwing an error if you end up on Special:Contributions without any username specified.

With that in mind, the first block of code in that section seems designed just to get the username (via,  , and  ). You wrote this (excellent script) nearly a decade ago, well before  existed. That whole block could be simplified by replacing it with  but wanted to post here before making a somewhat significant code change in your script. ~ Amory  (u • t • c) 19:43, 7 September 2018 (UTC)
 * Oh, cool. Yes, the purpose of those regexes is to determine the user to load, so replacing it with the value from `wgRelevantUserName` seems like a good idea to me. A le_Jrb talk 14:07, 9 September 2018 (UTC)
 * ✅. I didn't realize it before, but the regex was out of date anyway, so it should work for IPv6 addresses now. ~  Amory  (u • t • c) 16:29, 9 September 2018 (UTC)

Fix for broken namespace menu on Special:Contributions
Hey, after the above, I hope you don't mind that I made a few improvements and bugfixes to this while you were less active; I'm a big fan of this script, and there have been a number of changes to contributions and history pages in the past year or so. I noticed today that the current system used by the script breaks the appearance of the "invert selection" and "associated namespace" checkboxes on Special:Contributions;  freezes whatever status existed upon load, which is hidden, hence I only just discovered they even existed! There are a few ways to do this, but replacing the last three lines of the contributions section with the following seems like it should work: I can take care of it if you like, but I noticed that coincidentally you've been making a number of edits today, so I wanted to check with you before doing it. ~ Amory  (u • t • c) 21:12, 10 May 2019 (UTC)
 * ✅ ~ Amory  (u • t • c) 16:27, 13 May 2019 (UTC)
 * Thanks for this! A le_Jrb talk 00:20, 14 May 2019 (UTC)

Minor fix for history of a deleted page
Might I suggest changing line 167 from: to: It's unlikely, but if someone attempts to view the history of nonexistant or deleted page,  complains since   doesn't exist. There are other work arounds but this seems the smoothest. ~ Amory  (u • t • c) 14:52, 4 October 2019 (UTC)
 * I've gone and made this change, hope you don't mind. I've also changed my work from the above section so that it's a separate span, matching the other links rather than being nested within one. ~  Amory  (u • t • c) 14:55, 9 October 2019 (UTC)
 * Makes sense, thanks! A le_Jrb talk 12:40, 16 October 2019 (UTC)

Occasional waLib failures
I occasionally get this when clicking on an "all" link, do other folks? AFAICT the waLib is only used at that point, so what about putting off loading until then, and using mw.loader.getScript since it returns a promise? That should ensure no errors. ~ Amory  (u • t • c) 21:35, 7 February 2021 (UTC)