View text source at Wikipedia


User:Aaron Liu/Watchlyst Greybar Unsin

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; 20 months ago (2023-01-27)
Original: February 20, 2007; 17 years ago (2007-02-20)
Version3.3
UpdatedOctober 17, 2024
    (1 day ago)
SkinsTheoretically 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:

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;
}

Idea board

[edit]

Installation

[edit]

On English Wikipedia it is recommended to install this script using the script-installer gadget, which can be turned on at:

Preferences → Gadgets → Advanced → Tick Install scripts without having to manually edit JavaScript files (documentation) (direct link)

Then you can go back to this page and click the big blue "Install" button in the infobox.

To install the script on another wiki (including your global.js), use the following snippet:

mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Aaron_Liu/Watchlyst_Greybar_Unsin.js&action=raw&ctype=text/javascript'); // Backlink: [[w:User:Aaron Liu/Watchlyst Greybar Unsin]]