Hello. And that's because of different ids of regular "more" items.
- Mentioned In
- T211398: Compile list of gadgets across various projects that broke in timeless, and why
T185972: Timeless displays an empty sidebar section on pages connected to a Wikidata item but with no language links
T183172: Gadgets don't add links to the "Tool" sidebar section
- Mentioned Here
- T181206: Can't find Twinkle in Timeless skin
A work-around I've used in one of my scripts is checking the skin type and adjusting the portlet location accordingly, i.e. changing
mw.util.addPortletLink( 'p-cactions', '#', 'Foo', 'ca-foo', 'Foo bar baz qux' );
mw.util.addPortletLink( ( mw.config.get('skin') === 'timeless' ) ? 'p-pageactions' : 'p-cactions', '#', 'Foo', 'ca-foo', 'Foo bar baz qux' );
which is a little bit annoying to have to do, but it works.
(Maybe the more-used scripts should be implemented as extensions. Doesn't fix the bigger issue of course.)
Wouldn't it be a lot simpler, in the short term at least, for Timeless to reuse the same ids that all the other skins available on Wikimedia wikis (apart from Minerva/mobile) use, rather than inventing its own? I mean, its already doing so for a whole lot of other portlets (e.g. p-personal, p-tb, p-navigation, p-interaction), so why not change either p-pageactions or p-pagemisc to p-cactions?
(And maybe also create some sort of "Guide to making a new skin" to detail lessons learned from creating Timeless, which could include that for most existing userscripts/gadgets to work on your new skin, you should include portlets with standard ids.)
Actually, given the use case (adding tabs and often dropdowns), maybe it would be better to change pagetools instead of pagemisc? They are usually tabs, right?
Its a little bit complicated:
- In Vector, there are separate portlets for namespace/ns_talk (namespaces), read/edit/history/watch (views), and actions like move (cactions). The first two are tabs at the top of the page, the third is a dropdown menu from a tab labeled "More".
- In Monobook and Modern, these are all in one single portlet cactions displayed as tabs at the top of the page.
- In CologneBlue, namespace/ns_talk and history are combined as pageoptions, and edit and move are combined as cactions. Both are displayed as a list of links in the sidebar.
- Timeless is much like Vector, but: watch joins namespace/ns_talk in namespaces; read/edit/history is called pagetools; move is in pageactions.
So for the most compatibility pagetools should become views, and pageactions should become cactions.
But if we did that, there would have to be another bug for cactions not always being present: the conditional on line 404 means that the portlet isn't present on some pages (e.g. Special:Watchlist), and therefore scripts won't work if they try to add portlet links on such pages (they can do so on Vector because it includes the portlet elements on the page but with an empty <ul></ul> inside).