Implement CTOP protection logging#2214
Implement CTOP protection logging#2214IlyasLebleu wants to merge 7 commits intowikimedia-gadgets:masterfrom
Conversation
|
cc @siddharthvp since this patch adds a Morebits function and you know the Morebits architecture better than I do. |
|
Regarding logging, it's being done by L235's bot, which only needs this to be in the edit summary for it. I'll take care of implementing on-wiki logging, thanks a lot! |
|
Note to self: test for XSS (if a bad actor were to edit the on-wiki JSON pages to put some HTML into the JSON)
I assume you mean "loading"? :) Sounds like the bot handles "logging" |
Yes, thanks, I got the two mixed up! It works now, but due to JSON being cached, we might have to wait a day for the GS list to be retrieved (the CTOP one already is). |
| .select2({ | ||
| theme: 'default select2-morebits', | ||
| width: '80%', | ||
| matcher: Morebits.select2.matchers.dashInsensitive, |
There was a problem hiding this comment.
Why is this needed? Russo-Ukrainian War seems like the only entry with dash, which is easily retrieved from a search for "rus" or "ukr". Number of GS topics is so small that a user likely never has to enter more than 3 characters, so using custom search matchers feels like overengineering.
There was a problem hiding this comment.
Needed for code matching. Some codes like A-A or A-I need the dash for correct logging, but most people will just type AA or AI, and adding all of them as extra aliases would mean a lot of clutter.
There was a problem hiding this comment.
To clarify, I made it for CTOPs (where some codes have dashes), but it's more consistent to use the same matcher for GSes too since it's already there.
838ee36 to
f0c23fe
Compare
Dismissing the -1's since they have all been addressed. This is probably ready for a final review.

Implement logging of CTOP page protections per ArbCom decision here, Twinkle implementation requested here. Tested on test.wikipedia as usual.