MediaWiki talk:Gadget-confirmationRollback-mobile.js

Oct 2020 - broken?
Reported as not working in Village_pump_(technical)/Archive_184. would you take a look at this please? — xaosflux  Talk 16:54, 16 October 2020 (UTC)
 * Been playing around with this. I think the issue is how the gadget is loaded, or the script, or something. The actual script (MediaWiki:Gadget-confirmationRollback-mobile.js, minus the useragent part anyway) works fine when the event is added manually (the $(".mw-rollback-link").on part) using the developer console (that exact code). So I think the issue lies in how the stuff is being registered - that seems to be failing. I have minimal experience with MediaWiki and gadgets/userscripts, so no clue what's wrong, but just FYI. BTW, the user agent part, can't this be scrapped and just work regardless on the Minerva skin? (or perhaps the targets or skins options may be relevant?) ProcrastinatingReader (talk) 17:17, 16 October 2020 (UTC)
 * Just for reference, this is invoked by default using: . —  xaosflux  Talk 18:10, 16 October 2020 (UTC)
 * , note that this code fixes the bug, works on Minerva (at least on en.m. in Chrome, haven't tried on my actual phone) with it: User:ProcrastinatingReader/sandbox.js, when I swap the code of this to the gadget code (Special:Diff/983871059) it breaks. Maybe replace code with the sandbox? The useragent check part that I've commented out may well be fine (haven't tested), but maybe it's better to replace it in favour of a target mobile, or skin Minerva check (of ResourceLoader)? ProcrastinatingReader (talk) 19:07, 16 October 2020 (UTC)
 * Back when this was first created, the "advanced mode" of Mobile Frontend did not exist yet, so it was actually built for mobile users viewing desktop skins. This is why it checks user agents, and it will still need to in order to support that use case. I believe we just need to add mobile as a target to the RL config. I'm currently testing this out on testwiki and will update the gadget here when I get it working. Also I don't recall getting your ping on VPT from last month, sorry that I missed it. &mdash; MusikAnimal  talk  02:01, 17 October 2020 (UTC)
 * I think Special:Diff/983922297 fixed it. Please confirm. &mdash; MusikAnimal  talk  02:18, 17 October 2020 (UTC)
 * I believe we just need to add mobile as a target to the RL config. heh, obligatory I have minimal experience with MediaWiki and gadgets/userscripts, so no clue what's wrong, but just FYI above ended up being handy (assuming that fixes it; it probably will). Thanks for looking into it! ProcrastinatingReader (talk) 02:19, 17 October 2020 (UTC)
 * yes, works now. Thanks again! ProcrastinatingReader (talk) 02:21, 17 October 2020 (UTC)