User:Aaron Liu/Watchlyst Greybar Unsin

Source: Wikipedia, the free encyclopedia.
Watchlyst Greybar Unsin
DescriptionAdds a site-wide subtitle that displays the contents of new watchlist items that haven't been marked as seen.
StatusActive
First releasedJanuary 27, 2023; 15 months ago (2023-01-27)
Original: February 20, 2007; 17 years ago (2007-02-20)
Version3.1.4
UpdatedApril 4, 2024
    (23 days ago)
Skin supportTheoretically all
SourceUser:Aaron Liu/Watchlyst Greybar Unsin.js

Adds a subtitle when new watchlist items appear that haven't been marked as seen. Rewrite of User:Ais523/watchlistnotifier with modern APIs. New features:

  • Don't display watchlist items marked as seen
  • Don't display empty edit messages
  • Display rendered wikitext of watchlist comments
  • Article, Diff and Hist links (normal edits only)
  • Links to the relevant userpage/contributions page for every item
  • Display non-edits (page creations, marked as reviewed, etc) with correct messages
  • A dismiss button to mark the displayed edit as read
    • Link color varies based on the first, unvisited, unclassed link tot attempt to adapt to current skin. This causes a blackish color on Special:Search and mw:Flow topics. Better heuristics that aren't just exceptions are welcome.
    • Due to T361855, categorization actions will not be displayed because they are always unread.
  • Theoretical support for ALL skins with a subtitle
  • Doesn't do that weird bolding of unseen watchlist items
  • Watchlist items' link styling also apply to our notifs

Requests are welcome. I'd really like some wise UI mage to come at fix me a button that marks the displayed entry as read.

To correctly add the button, this script currently nests the text and buttons inside a span inside an aside, which is added to the subtitle. Better implementations are welcome.

Near the end of October 2023, the subtitle font size (among other things) for Vector 2022 were bumped up to 14px from 13px. Later, sizes were made more relative. To approximately fix this for this script's messages only so that it looks like the screenshots above, include the following CSS:

/* V22/Watchlyst: Fix big font size introduced in T346062 */
.skin-vector-2022 #watchlyst {
	font-size: 0.8rem;
}