MediaWiki talk:Gadget-watchlist-notice-core.js

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

Fix expunging of old notices[edit]

On French Wikipedia, I have corrected a call to splice: 184859486. You may want to apply the fix here as well. Ping TheDJ :) Od1n (talk) 11:35, 22 July 2021 (UTC)[reply]

  • Adding the edit interface-protected notice as a courtesy. Nardog (talk) 09:38, 23 July 2021 (UTC)[reply]
  • @Od1n: I'm not very familiar with that function, can you explain the difference - and more importantly the impact? I'm not aware of any problems going on? — xaosflux Talk 13:41, 23 July 2021 (UTC)[reply]
I have applied another bugfix. This function was really broken… Od1n (talk) 16:01, 26 July 2021 (UTC)[reply]
@Od1n: can you describe the "bug" ? — xaosflux Talk 20:51, 28 July 2021 (UTC)[reply]
Current code is unambiguously wrong, so that the old notices are never expunged from the localStorage. I did my best to describe in the edit summaries, and the MDN docs are well written: splice() and in operator. I have done other changes on the French wiki version, though the 2 diffs above are the most important ones, so that at least the code works as expected. Od1n (talk) 17:28, 29 July 2021 (UTC)[reply]
 Done @Od1n: thank you, I have applied those two fixes - a bit tricky to test this one (any intadmin should revert without consult if new issues are introduced). — xaosflux Talk 14:07, 30 July 2021 (UTC)[reply]

Make dismissButton a real button[edit]

Implement Special:Diff/1211506565/1211534077 and Special:Diff/1211506948/1213428873, which would turn the "[ dismiss ]" link button into an actual button that reads "[dismiss]". This has several benefits, such as not altering the page link, making semantic sense, and allowing the user to fully customize the button; for example, they can now remove the brackets if they want.
If spaces between the brackets (i.e. "[ dismiss ]" instead of "[dismiss]") are wanted, I could add them back, though currently they're removed due to how other bracket buttons (such as "[show]" above) don't use spaces.
This has been tested by including a version of the gadgets with my diffs applied in my common.js/css pages and looking at the watchlist, per @Xaosflux's suggestion (thanks!) Aaron Liu (talk) 23:25, 2 March 2024 (UTC)[reply]

@Aaron Liu to verify did you then also use ?useskin and check all of the skins to make sure nothing breaks? — xaosflux Talk 00:33, 3 March 2024 (UTC)[reply]
Yes, though I've only just now realized that Vector 2010 isn't the only legacy link color in town; the link color is out of place everywhere (especially noticeable in Minerva and Modern) except on the Vector skins, because the base color is from V10 and I added a special selector for V22. Should I add a separate color rule for each skin we currently have, or should I get the color of links by pulling the color from getComputedStyle(document.querySelector('.mw-changeslist a:link'))? Aaron Liu (talk) 01:29, 3 March 2024 (UTC)[reply]
@Xaosflux Done, and I've added automatic link color detection. Diff links have been updated, though you can simply copy the CSS page, and do the same for the JS page after removing the first and last line. Aaron Liu (talk) 01:50, 3 March 2024 (UTC)[reply]
Another way would be to forget about skins and just set the link color to LinkText, a CSS "magic word" that gives you the browser/system's link color. Aaron Liu (talk) 20:48, 12 March 2024 (UTC)[reply]