MediaWiki talk:Gadget-WatchlistNotice.js

From Wikidata
Jump to navigation Jump to search

Make watchlist notice hideable[edit]

{{Edit request}}

https://phabricator.wikimedia.org/T213012 Asks that the watchlist notice to be able hidden with a gadget. User:Lymantria copied the gadget JS code that does this from Commons to this page but forgot to copy the rest of the dependent pages. These instructions below finish that process and also use the English Wikipedia's gadget instead of Commons which I find cleaner.

  1. Replace MediaWiki:Gadget-WatchlistNotice.js with https://en.wikipedia.org/wiki/MediaWiki:Gadget-watchlist-notice.js
  2. Copy https://en.wikipedia.org/wiki/MediaWiki:Gadget-watchlist-notice-core.js to https://www.wikidata.org/wiki/MediaWiki:Gadget-watchlist-notice-core.js
  3. Update https://www.wikidata.org/wiki/Template:Display/watchlist to https://en.wikipedia.org/wiki/Template:Display/watchlist
  4. Replace https://www.wikidata.org/wiki/MediaWiki:Watchlist-summary with

{{Display/watchlist |cookie=100 |text= {{Watchlist summary/{{#ifexist:Template:Watchlist summary/{{int:lang}}|{{int:lang}}|en}}}} }}

  1. Enable MediaWiki:Gadget-WatchlistNotice.js

Lectrician1 (talk) 14:38, 28 November 2022 (UTC)[reply]

✓ Done I hope all worked correctly, if not, please let me know. Lymantria (talk) 06:03, 30 November 2022 (UTC) P.S. I'm not sure what is meant by "Enable MediaWiki:Gadget-WatchlistNotice.js". Lymantria (talk) 06:06, 30 November 2022 (UTC)[reply]
@Lymantria It means enable it as a Gadget other users can turn on in their preferences. To do this, add
* WatchlistNotice[ResourceLoader|default|rights=purge]|WatchlistNotice.js
* watchlist-notice-core[ResourceLoader|dependencies=mediawiki.storage|hidden]|watchlist-notice-core.js
to the === general === section of MediaWiki:Gadgets-definition Lectrician1 (talk) 14:13, 30 November 2022 (UTC)[reply]
Done. Lymantria (talk) 17:57, 30 November 2022 (UTC)[reply]