User talk:Evad37/TimestampDiffs.js

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

TimestampDiffs broken[edit]

Moved from User talk:Evad37
 – Evad37 [talk] 01:56, 5 January 2021 (UTC)[reply]

Hey Evad. User:Evad37/TimestampDiffs seems to be broken with the Wikipedia:Comments in Local Time gadget, which produces the following broken HTML:

<span class="localcomments" timestamp="1609083791472" title="<span class='tsdiffs-timestamp tsdiffs-unlinked'>15:43, 27 December 2020 (UTC)</span>" style="font-size: 95%; white-space: nowrap;">Yesterday, 3:43 pm (UTC+0)</span>

Without TimestampDiffs:

<span class="localcomments" timestamp="1609083786525" title="15:43, 27 December 2020 (UTC)" style="font-size: 95%; white-space: nowrap;">Yesterday, 3:43 pm (UTC+0)</span>

As a secondary issue, having the script enab;ed seems to cause clicking on an anchored (eg section title) link to the page to scroll to the top of the page right after loading finishes. ProcrastinatingReader (talk) 22:17, 28 December 2020 (UTC)[reply]

Yeah, they're both trying to modify the HTML around timestamps, but the gadget gets to run first, and then this script isn't (yet) smart enough to recognise those changes, or to only act on actual text and not html tag attributes. The second problem is probably also related to the "dumb" way this script is adding the diff links. - Evad37 [talk] 00:43, 29 December 2020 (UTC)[reply]
@ProcrastinatingReader: Should be fixed now - Evad37 [talk] 02:53, 29 December 2020 (UTC)[reply]
Works now. Thanks very much Evad! ProcrastinatingReader (talk) 14:11, 29 December 2020 (UTC)[reply]
@Evad37 now I get a pop-up on pages that don't exist - viewing https://en.wikipedia.org/wiki/Wikipedia:Copyright_problems/2020_December_23 (which doesn't exist) notifies me that the script failed to load because there weren't any revisions. Would it be possible to stop earlier if the page doesn't exist? DannyS712 (talk) 07:00, 30 December 2020 (UTC)[reply]
@DannyS712:  Fixed - Evad37 [talk] 09:03, 30 December 2020 (UTC)[reply]
Maybe this is a bit far, but is it possible for the script to (for archive pages) search the original page instead? Since on an archive the edits were actually made on the parent page. Example: Wikipedia talk:Edit warring/Archives/2017/May, the script can't detect any of the diffs on this page, presumably because the edits were never made there? ProcrastinatingReader (talk) 11:47, 4 January 2021 (UTC)[reply]
@ProcrastinatingReader:  Done! Will work for any archive subpage naming scheme that begins with /Archive (case insensitive) - Evad37 [talk] 02:00, 5 January 2021 (UTC)[reply]

Other archive pages[edit]

@Evad37: Your script is a lifesaver! Another feature request, though. Could this handle non-standard archive page names? For example, Wikipedia:Administrators' noticeboard/Archive330 and Wikipedia:Administrators' noticeboard/IncidentArchive1059 do not follow the standard archive naming scheme. Would it be possible to have the tool detect these, too? ProcrastinatingReader (talk) 14:57, 23 February 2021 (UTC)[reply]

@Evad37: I've made these changes, and some other tweaks (eg was 'rvStartId' a typo? seems to keep returning the same results. changed to rvstartid) in User:ProcrastinatingReader/TimestampDiffs.js. Seem to work for me, but please check them over if you have time and possibly merge them into here? ProcrastinatingReader (talk) 10:43, 25 February 2021 (UTC)[reply]
Adding: there are some issues though. First, localcomments support still seems to be broken when it changes it into a non-UTC+0 timezone. Second, my change changing the revstartid fixes the archives issue but causes "TimestampDiffs failed to load. Error: badid_rvstartid" on e.g. the "edit source" page. Probably just needs a validation check somewhere. ProcrastinatingReader (talk) 10:45, 25 February 2021 (UTC)[reply]
@ProcrastinatingReader FWIW convenientDiscussions has a feature to view diffs from comments, and it handles the ANI/AN3 special cases. – SD0001 (talk) 17:57, 31 March 2021 (UTC)[reply]

Interface-protected edit request on 23 June 2021[edit]

Special:Diff/1029981948 makes TimestampDiffs compatible with User:Mxn/CommentsInLocalTime.js as requested by Guarapiranga. Without this change, TimestampDiffs is unable to find the original formatted timestamp to match against formatted page revision timestamps, because this version of CommentsInLocalTime allows the tooltip to be customized arbitrarily, and the default format doesn't match the wiki default.

Additionally, Special:Diff/1029983353 preserves CommentsInLocalTime's customizable tooltip by appending it to the edit summary that TimestampDiffs puts in the link tooltip.

Thank you for this nifty user script, Evad37!

 – Minh Nguyễn 💬 05:29, 23 June 2021 (UTC)[reply]

Thumbs up icon Thanks, Mxn. — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚  05:34, 23 June 2021 (UTC)[reply]
@Evad37: - as this is your personal script. — xaosflux Talk 09:50, 6 July 2021 (UTC)[reply]
 Not done as this is a personal userscript and the owner is an active editor (and int-admin). Evad37 may personally deal with this if they would like to, feel free to follow up on their primary talk page if needed. — xaosflux Talk 16:00, 9 July 2021 (UTC)[reply]
👍 Thanks for the compatibility update, Evad37.
While I have your attention, how about bringing to this script the functionality of your also excellent User:Evad37/Thanky.js to allow users--or just me! --to thank editors for their comments in talk pages? — Guarapiranga  14:07, 16 July 2021 (UTC)[reply]