Leave rule off for now as manual fixes are required.
Also temporarily disable prefer-const rule as that
will also require some manual fixes.
Change-Id: I8c3478f26f51287acb943bd38c9c1020c06b9f39
The PHP code should never see a `<span class="mw-headline">` node
since MediaWiki change If04d72f427ec3c3730e757cbb3ade8840c09f7d3,
but we have to support it for our old integration tests (T363031).
Improve code comments to explain this and move the handling to
one place, so that it can be deleted more easily in the future.
Follow-up to 08f61b2609.
Change-Id: I5ab9d3373a6911c1456c30d844b66576b278a1b5
When an arrow function body contains just a single `return` statement,
the braces can be omitted.
(Changes are mostly made by `grunt eslint --fix`, with only some line
breaks added by hand.)
Change-Id: I37f259f87085c8d20ed09cfa58a8456dd36cdc38
Similar reasoning for our existing filter on just `/`; it's only really
used in state routing.
Bug: T361322
Change-Id: Ibcf1a58a884b953003012640041471d3bb5c9450
Top is in the WHATWG spec as a magic value that always navigates to the
top of the document.
There used to be a #top element in pre-Vector2022 skins, and it's in
fairly wide use on some wikis in signatures and via gadgets, so many
links exist that point to it.
Bug: T360274
Change-Id: Ia12464239ab2cdc428c570d0cf5df1c0d1780b7a
We no longer need to support toggling visual enhancements without
reloading the page, so we can remove the extraneous set of buttons
to reduce HTML size.
Bug: T322457
Change-Id: I54e57c754c54b7e611069f9832d1ebabf141a396
We need to more carefully wait for mobile section toggling to happen.
Follow-up to 3957d7ac25.
Bug: T338920
Change-Id: I1bd31483c5be9428075f07494e89b06f19f8bf23
MediaWiki should never generate links like this, but users or 3rd
party tools probably create them accidentally quite regularly, and
we do a similar thing with Title normalisation.
Change-Id: Ia467f422578bcb9b4d3fb8feab0b85f4b6436f7e
This is still an experimental feature and not deployed
anywhere, but as we mute the timestamp to indicate it
is more part of the interface than the content, we should
do the same with this overflow menu button.
Change-Id: I30391912377692fffa9e67e8c4ca63db715878bf
In certain cases the parser could go back rather than forward after
finding a signature, causing it to find the same signature forever
until it ran out of memory.
Test cases coming later in a separate patch.
Bug: T356884
Change-Id: I8ac72b05e5e4ed45e6119c012a69708c9d8eda29
Follow-up to 8a8c7270cf.
I think this wasn't working becase we were doing it in the wrong
order (reply tool initialization would disable toggling section
state before toggler toggled it open).
Bug: T338920
Change-Id: I7ed3d5c149ddb3d33cb67010f032c63e175687f2
* Keep the information about this in the API result, which we were
previously omitting
* Use it instead of duplicating the logic client-side
Bug: T356131
Change-Id: I7e7342e9d94a171b5ef56e646871c18c8c39c44c
`decodeURI( fragment )` can throw if the fragment isn't correctly
encoded – e.g. when it's just '#%'.
Use mw.util.percentDecodeFragment() instead, which uses a more
resilient algorithm.
Change-Id: I8447771ad2ae33da52b71d4127981dd8a2018a7d