Loading code twice sows confusion in developers and bloats code for end users.
Following on from T257265, the mediawiki.page.ready module was recently enabled on mobile.
This module [[ https://github.com/wikimedia/mediawiki/blob/9b5a9876447cb000175efa1dbdc679ad6f4ce9d1/resources/src/mediawiki.page.ready/ready.js#L119 | contains currently inert code ]] that binds a click handler to `#pt-logout a[data-mw="interface"]` to provide a "smart logout". This selector matches nothing in Minerva and is duplicated here: https://github.com/wikimedia/mediawiki-skins-MinervaNeue/blob/f915d69872b0f4e3e9c93903adb49889cdb6033a/resources/skins.minerva.scripts/initMobile.js#L269
I see two possible solutions for paying off this technical debt:
1) Match the core selector - requires supporting IDs on MenuEntry items and adding data-mw=interface attributes
2) Allow customization of the selector via the SkinPageReadyConfig that Minerva is already using and update the selector
it seems 1 would be preferable.
# Developer notes
* Matching the selector will require adding data-mw="interface" to main menu links. It seems this could easily be hardcoded to all links in `includes/Skins/menuGroup.mustache`.
* The ID of the `li` item in menuGroups could be derived from the existing name e.g. `id="pt-{{name}}"` or provided explicitly via changes to the model
Gotchas:
* Note in non AMC there are 2 links that would match such a selector
* Mustache inherits parent properties. Be careful not to inherit the ID of the parent group e.g. #p-personal