MediaWiki talk:Gadgets-definition

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

For information about gadgets, see Wikipedia:Gadget; for the addition of user scripts as gadgets, see Wikipedia:Gadget proposals.

Switching watchlist notices to use web storage instead of cookies[edit]

Not directly related to this page, but I figured the audience would be more suitable. I'm proposing we move geonotices away from cookies and start using localstorage instead. The reason for this is that cookies get transmitted unnecessarily. For this we would add the dependency to geonotice and watchlist core modules in the gadgets. The code would look something like: [1] and [2] respectively. It would have backwards compatibility for already hidden notices via cookies during the transition period.

Alternatively, I have even considered moving notices into (invisible) userpreferences. This should be possible with the API, but we would need to protect against large keys/ids for the notices and a few other potential safety issues. It would have the benefit of really dismissing a notice on all your computers, but it brings more unknowns (like how does that work with globalpreferences, harder to reset manually etc) —TheDJ (talkcontribs) 09:02, 14 June 2018 (UTC)

@TheDJ: I'm a bit behind on localstorage mechanics, is this what we are already using for CentralNotice dismissals? — xaosflux Talk 22:35, 14 June 2018 (UTC)
@Xaosflux: Correct. Although CN still uses cookies for it's session management, all dimiss and all other information for CN is in Web storage. —TheDJ (talkcontribs) 05:44, 15 June 2018 (UTC)
Geonotice is now switchedTheDJ (talkcontribs) 16:39, 17 June 2018 (UTC)
Watchlist is now switched as well. —TheDJ (talkcontribs) 20:48, 20 June 2018 (UTC)
@TheDJ: still using the cookie=n syntax for new messages? — xaosflux Talk 00:44, 21 June 2018 (UTC)
Yup, didnt change anything about the messages structure. —TheDJ (talkcontribs) 10:21, 21 June 2018 (UTC)


The old toolbar is going away sooner rather than later (WP:THURSDAY). See WP:VPT#Support ends for the 2006 wikitext editor. I suspect this gadget can be removed as a result. --Izno (talk) 23:18, 29 October 2018 (UTC)

Protected edit request on 13 January 2019[edit]

The first line currently reads:

<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Village pump (technical)]] or [[Wikipedia_talk:Gadget]].'''

Please change it to:

<noinclude>'''Changes to this page should first be discussed on [[Wikipedia:Village pump (technical)]] or [[Wikipedia talk:Gadget]].'''

The difference? Wikipedia_talk:Gadget vs Wikipedia talk:Gadget (removing the underscore).

Thanks, --DannyS712 (talk) 01:36, 13 January 2019 (UTC)

 Donexaosflux Talk 02:08, 13 January 2019 (UTC)

Add table of contents?[edit]

Our gadget list is long. MediaWiki:Gadgets-definition displays a table of contents on the page itself. Is it possible to make one at Special:Preferences#mw-prefsection-gadgets? "Browsing" and the other headings do not currently have an id in the html. I guess that could be requested at Phabricator but without that I imagine something like changing == browsing == to == <span id="Browsing">browsing</span> ==, or saying <span id="Browsing">browsing</span> in MediaWiki:Gadget-section-browsing. Then it should be possible to make a TOC manually in MediaWiki:Gadgets-prefstext with links like [[#Browsing|Browsing]]. I don't know whether MediaWiki would accept anchors when it processes MediaWiki:Gadgets-definition or MediaWiki:Gadget-section-browsing. PrimeHunter (talk) 11:51, 28 February 2019 (UTC)

I don’t think adding IDs to MediaWiki:Gadgets-definition would work—I think it would at most cause MediaWiki to try to load MediaWiki:Gadget-section-<span_id=* pages, or just fail somehow. Maybe adding these IDs to MediaWiki:Gadget-section-* pages could work. But asking on Phabricator to add IDs based on the internal section names (which are given as section titles on MediaWiki:Gadgets-definition) seems a better solution for me, especially as that can be more relied upon than a bunch of other pages, and also makes it easier to create the TOC automatically using Lua. —Tacsipacsi (talk) 09:58, 2 March 2019 (UTC)
It's a good idea while we have that tab. All of the pages could use a table of contents right now.
The longer-term improvement might be integration of gadgets on to separate preference pages. That way someone looking for stuff about the watchlist would find it on the watchlist tab. --Izno (talk) 14:20, 2 March 2019 (UTC)
Added a phab task. --Izno (talk) 21:48, 4 March 2019 (UTC)