User talk:Ais523/watchlistnotifier.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

One's own edits[edit]

Is there any way I can configure this script to not display when I'm the one who changed something? --Explodicle (talk) 18:19, 21 May 2008 (UTC)[reply]

Not at all easily, I'm afraid. Although it's easy to change the script so that if you have the most recent change it doesn't display, it then wouldn't display if someone else changed something on one page you watch and then you changed something on a different page you watch. Getting more changes then the most recent 1 would put extra load on the server. --ais523 09:47, 22 May 2008 (UTC)
Oh well, it's still a good script. Thanks! --Explodicle (talk) 14:19, 22 May 2008 (UTC)[reply]

Script broken?[edit]

This script seems to be broken (at least for Vector) since the 1.18 upgrade. It now says "watchlistnotifier can't determine whether a watched page has changed" at the top of my pages. Whatever was bolding my watched items is also broken, if that helps (I think that was separate from this script).

Legacy JavaScript[edit]

Hello! This script has been detected as using deprecated parameters that need to be replaced with the updated version. Examples include addOnloadHook( ... ) needs to be replaced with $( ... ) or $( function() { ... } ) (depending on use); all wgGlobalVariables need to be properly gotten with mw.config.get( 'wgGlobalVariable' ); and addPortletLink needs to be called with mw.util.addPortletLink. Please see MW:ResourceLoader/Legacy JavaScript for details. Thank you. — {{U|Technical 13}} (etc) 20:30, 19 January 2015 (UTC)[reply]

Interface-protected edit request on 25 January 2023[edit]

Add

&wlshow=unread

to the request on line 90. Aaron Liu (talk) 13:27, 25 January 2023 (UTC)[reply]

 Not done, of course if User:Ais523 would like to change their own personal script to do that they may. — xaosflux Talk 14:22, 25 January 2023 (UTC)[reply]
It's not just personal, it's the most used watchlist notifier script. Aaron Liu (talk) 01:45, 27 January 2023 (UTC)[reply]
Could you be clear on what this change would do if implemented? At a first glance, it seems to duplicate the check on line 77. --ais523 12:28, 30 January 2023 (UTC)[reply]
I've forked the script at User:Aaron Liu/Watchlyst Greybar Unsin.js . It doesn't duplicate the check. Some time ago they added a new feature to the watchlist that allows you to mark items as seen. This doesn't rely on a cookie (as in line 54) that changes between browsers and instead relys on your account. After adding this part to the request only changes that have not been marked as seen will show up in the response. Note that if this change is added then lines 46~48 have to be removed else the message will display when all changes have been marked as seen. Aaron Liu (talk) 13:14, 30 January 2023 (UTC)[reply]
OK, so the difference is that with the current code, if you change to a different browser (e.g. because you're using a different computer) and nobody edits any page on your watchlist during the change, you'll get a duplicate notification – whereas with the suggested change, you might not get a notification the second time (because it remembers which notifications you've seen using by attaching data to your Wikipedia account, rather than storing it in your browser). The trade-off for the change is that the script will no longer be aware that it's broken if it gets broken by a MediaWiki change (because "I last checked my watchlist with a different browser and nobody has edited a page on the watchlist since" is indistinguishable from "the watchlist API isn't producing results for some reason". Additionally, if I understand correctly, your change would suppress the duplicate notification in this case only if the user had visited the page that was the subject of the most recent notification (rather than suppressing it if the user had visited their watchlist, which is the trigger this script normally uses to determine whether to suppress a notification), so the suggested change would only be a partial fix.
I don't think that that trade-off would be worth it for most users – it's pretty common to have at least one high-traffic page on any given watchlist, so the odds that nobody will edit any page on a watchlist while you're changing browser are fairly low (and the impact of the bug also low – you just see one notification twice), whereas the brokenness detection has come in useful in the past (as can be seen on this very talk page). --ais523 11:17, 1 February 2023 (UTC)[reply]
only if the user had visited the page not necessarily. There’s also a button on the watchlist for mark changes as seen. I get your point though. Aaron Liu (talk) 14:05, 1 February 2023 (UTC)[reply]

@Ais523: I just thought of something. Maybe, if the revid==-1, we could make another call without the wl=unseen parameter, and do the error message if that also returns revid==-1. Aaron Liu (talk) 17:16, 4 February 2023 (UTC)[reply]

BTW, these stuff (though not the revid error catching) along with some other features and modernizations are now in my fork, User:Aaron Liu/Watchlyst Greybar Unsin Aaron Liu (talk) 17:01, 7 December 2023 (UTC)[reply]