Jump to content

User talk:Mxn/CommentsInLocalTime

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

Hang

[edit]

This script hangs on Wikipedia:WikiProject Black Lives Matter in multiple browsers, probably due to something unusual about the participant signatures towards the bottom.

GAN page

[edit]

WP:GAN has not been loading for me for the past couple of days; commenting out this script fixed it. Perhaps there are too many nominations (timestamps) to convert? I had no issues with other pages. Olivaw-Daneel (talk) 17:19, 27 May 2022 (UTC)[reply]

@Olivaw-Daneel: We finally figured out why the hang occurs and it should be fixed now. Sorry for the inconvenience and delay! Minh Nguyễn 💬 18:07, 24 December 2022 (UTC)[reply]
Thank you! Olivaw-Daneel (talk) 18:19, 24 December 2022 (UTC)[reply]

Hanging

[edit]

The page WP:DRN/V uses 100% CPU forever in Chrome and Firefox (at least on Linux), which is weird because it doesn't contain any comment timestamps! I wonder if the bare list of users at the bottom is the problem. Thparkth (talk) 20:12, 18 November 2022 (UTC)[reply]

I created an edit request to fix this issue here. Thparkth (talk) 22:01, 18 November 2022 (UTC)[reply]

Provide a way to re-run

[edit]

I use a discussions script that can AJAX reload the entire page, and I need a way to run this wonderful script of @Mxn after that, but currently, the script can't be loaded twice. Any ideas? Just having an additional function for re-processing after the initial loading would be enough as the script has separate hooks for the first time and subsequent times.

See also c:User talk:Jack who built the house/Convenient Discussions#Hook for after replying. Aaron Liu (talk) 19:11, 15 April 2024 (UTC)[reply]

@Mxn Any follow-up on this? See the fix Aaron Liu made at c:User talk:Jack who built the house/Convenient Discussions#Hook for after replying. waddie96 ★ (talk) 15:22, 5 January 2025 (UTC)[reply]
@Aaron Liu @Waddie96: Sorry for the delay; I wasn't watching this page very closely. The whole script runs on the wrapTimestamps() and formatTimestamps() functions, but they aren't exposed externally. It looks like m:Special:PermanentLink/28055331#L-58 relies on the convenientDiscussions.commentsReady hook; would it be appropriate for me to add that hook directly to this user script? I'm not particularly familiar with Convenient Discussions (and am kind of intimidated by it). Minh Nguyễn 💬 02:34, 24 January 2025 (UTC)[reply]
I just need a function exposed to skip parts of the construction that aren't needed and just check for all the timestamps again. CD isn't necessarily the only script that should call for CILT to re-run. Aaron Liu (talk) 03:04, 24 January 2025 (UTC)[reply]
@Aaron Liu @Waddie96: OK, I've exposed window.LocalComments.wrapTimestamps() and window.LocalComments.formatTimestamps(). You can call either function as many times as you need. wrapTimestamps() is pretty cheap, but if you know the timestamps are already wrapped in <time> elements, then you can skip right to calling wrapTimestamps(). Minh Nguyễn 💬 01:00, 26 January 2025 (UTC)[reply]
Great, thanks! Aaron Liu (talk) 00:12, 1 February 2025 (UTC)[reply]