Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

---

## [1.7.5] - 2026-05-18

### Changed
- **`readSender` now defaults to `false`** — only the message body is spoken. The sender name toggle remains available in settings for users who want it.

### Fixed
- **Catch-all name prefix strip** — added a final regex in `normalizeMsg` that removes any `"Name: "` or `"First Last: "` pattern left at the start of the body after all sender-specific stripping passes. This covers the case where VTF injects the username directly into the message body element in a format none of the targeted strips caught.

---

## [1.7.4] - 2026-05-18

### Fixed
Expand Down Expand Up @@ -162,6 +172,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),

---

[1.7.5]: https://github.com/sbcmsbgithub/message-reader/releases/tag/v1.7.5
[1.7.4]: https://github.com/sbcmsbgithub/message-reader/releases/tag/v1.7.4
[1.7.3]: https://github.com/sbcmsbgithub/message-reader/releases/tag/v1.7.3
[1.7.2]: https://github.com/sbcmsbgithub/message-reader/releases/tag/v1.7.2
Expand Down
8 changes: 6 additions & 2 deletions message-reader.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Message Reader
// @namespace https://github.com/sbcmsbgithub/message-reader
// @version 1.7.4
// @version 1.7.5
// @description Reads chat messages aloud on configured sites. Pick any element as the watched container. Includes playback controls, ignore list, voice/rate/volume settings, and time/first-name options.
// @match *://*/*
// @grant none
Expand Down Expand Up @@ -50,7 +50,7 @@
selector: 'as-split-area.alert-chat-box.as-split-area:nth-of-type(1) > as-split.as-percent.as-vertical > as-split-area.chat-box.as-split-area:nth-of-type(2) > app-chat > div.chat.d-flex > app-roomscroller',
rate: 1.0, pitch: 1.0, volume: 1.0,
voiceURI: '',
readSender: true,
readSender: false,
firstNameOnly: true,
announceTime: false,
skipOwnMessages: true,
Expand Down Expand Up @@ -422,6 +422,10 @@
msg.body = stripSenderFromStart(msg.body, firstName);
}
msg.body = msg.body.replace(TS_LEADING, '').trim();
// Final catch-all: if a "Name: " or "First Last: " prefix survived all the
// sender-specific passes, remove it. Targets the chat UI injecting the
// username into the body element itself.
msg.body = msg.body.replace(/^[A-Za-z][A-Za-z'-]{0,29}(?:\s+[A-Za-z][A-Za-z'-]{0,29})?:\s+/, '').trim();
return msg.body ? msg : null;
}

Expand Down