User talk:Mxn/CommentsInLocalTime.js

This is an old revision of this page, as edited by Thparkth (talk | contribs) at 22:00, 18 November 2022 (Interface-protected edit request on 18 November 2022: new section). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

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