User talk:Mxn/CommentsInLocalTime.js

This is an old revision of this page, as edited by Thparkth (talk | contribs) at 22:08, 18 November 2022 (I trusted the visual editor and it lied to me). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Interface-protected edit request on 18 November 2022

This script has a bug causing the browser window to hang unresponsively when encountering certain invalid dates. I will not include triggering examples in this edit request for obvious reasons, but User_talk:Thparkth/CommentsInLocalTime.js contains two examples (the zeroth of August and the 32nd of August). I found the issue trying to read Wikipedia:Dispute_resolution_noticeboard/Volunteering which contains the "zeroth of August" string.

My proposed edit modifies the date-matching regexp so that this particular bug will not be triggered. It also adds a "break glass" escape counter from the main while() loop to handle any other parsing misadventures that we don't currently know about. If there are other issues like this out there, the page will hang for around a second instead of forever.

The edit request is this diff: [1] Thparkth (talk) 22:00, 18 November 2022 (UTC)Reply

Note the "break glass" fix triggers on WP:GAN, reported by @Olivaw-Daneel here. I can't look into the actual underlying parsing error immediately but this edit request would be a good band-aid. Thparkth (talk) 22:06, 18 November 2022 (UTC)Reply