Jump to content

User:GhostInTheMachine/TalkHelper3

From Wikipedia, the free encyclopedia

GhostInTheMachineTalkBarnstarsHelpMiscModulesOtherLayoutPhotosProjectsScriptsTidyingTidyingSDUBXWIP2025-12-17 20:34:17

Purpose

[edit]

This user script is an update to TalkHelper2. It now handles the changes to the structure of talk page headings introduced in June 2024.

Version 3 also uses the standard Comments in Local Time gadget rather than incorporating my cloned and modified version.

The script does not alter any article but it highlights recent talk posts so that they are easier to read. It also provides a table of contents to the new talk posts and counters of how many posts were from yesterday and today.

Use

[edit]

The script hunts for timestamps previously created by the CommentsInLocalTime gadget and selects any that are for yesterday and today.

It then adds a background colour and border around each of the posts.

If any posts were found, the script will:

  • add a menu button showing the count — clicking the menu item will scroll to the first post of that day
  • build a table of the posts, sorted into time order, and add this table to the left-hand sidebar

To provide space in the sidebar, the script also alters the existing sidebar menus so that they can be collapsed.

Prerequisites

[edit]

This script requires the CommentsInLocalTime gadget.

  1. Go to the gadgets tab of your preferences
  2. Enable "Change UTC-based times and dates, such as those used in signatures, to be relative to local time"
  3. Save

Installing

[edit]

Add the following line to your common.js file if you want version 3:

{{subst:Lusc|User:GhostInTheMachine/TalkHelper3.js}}

or this line if you just want whatever is the latest version:

{{subst:Lusc|User:GhostInTheMachine/TalkHelper.js}}

Bugs

[edit]

Seems OK so far in real Vector. If you do use Vector 2022, please let me know how this script fits in.

Possible improvements

[edit]
  • Highlight posts for more than two days — use the hidden timestamps rather than searching for yesterday and today
    • This would remove the need for the Comments in Local Time gadget
  • Add switch to optionally float the left-hand sidebar so that it "sticks" to the top of the page

See also

[edit]