There are plenty of user scripts for the watchlist/recent changes, see w:en:Wikipedia:User_scripts/List#Listings. How can such scripts know when to run?
The usual strategy is to wait for document ready (by wrapping with $( function($) {
});
), then load dependencies (with mw.loader.using()
), then run code that interacts with the page. With new filters active, this doesn't always work. E.g. with my WikidataWatchlistLabels script, it will sometimes work (show labels for wikidata Q and P numbers) on page load, and other times not work. And of course the results can be reset, e.g. if a filter is removed, and the script doesn't know that it should run again.