Open NovemLinguae opened 2 years ago
It might be easier to check for the wikipediauserbox
class which comes from the userbox template.
This came up again today. Catching this early would prevent editors having to re-list at MFD, or editors having their TFDs become confusing and off-topic due to arguments about whether the TFD is valid.
Re-endorsing.
P.S. Today's example ( https://en.wikipedia.org/wiki/Template:Under18 ) does contain the wikipediauserbox class that TheTVExpert mentioned.
Requested by Whpq at https://en.wikipedia.org/wiki/Wikipedia_talk:Twinkle#Userbox_was_listed_at_TFD_instead_of_MFD
Current behavior is to only detect userboxes if the page title starts with
Template:User
. If that is detected, it defaults to MFD (the proper XFD venue for userboxes), and selecting TFD displays a warning.But there are some userboxes in template namespace that do not begin with
Template:User
. The best way to detect these is likely to pull the wikicode and search for{{Userbox
.https://github.com/wikimedia-gadgets/twinkle/blob/fc2a36595688b22d47f7f0b652475c0a4007fd5f/modules/twinklexfd.js#L166-L172
https://github.com/wikimedia-gadgets/twinkle/blob/fc2a36595688b22d47f7f0b652475c0a4007fd5f/modules/twinklexfd.js#L244-L250