wikimedia-gadgets / xfdcloser

Wikipedia gadget to close deletion discussions at XfD venues, including actions to implement closes
Other
2 stars 6 forks source link

headings sometimes incorrectly marked as closed if User:Novem_Linguae/Scripts/VoteCounter.js is installed #50

Open NovemLinguae opened 3 months ago

NovemLinguae commented 3 months ago

Steps to reproduce

What happens?

What should happen instead?

Notes

NovemLinguae commented 3 months ago

Looks like .xfd-closed is incorrectly getting placed on open sections.

image

I also see some hints that the first heading always gets links, then all following headings always don't get links.

NovemLinguae commented 3 months ago

Step debugging reveals this to be an interaction with the User:Novem Linguae/Scripts/VoteCounter.js script, which places a div with a class beneath the heading. XFDcloser's closed section detector looks for a sibling with a class to indicate closed.

This bug can be fixed by improving the detection algorithm.

image