-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to highlight all @ #4272
Comments
To the best of my ability to determine based on personal experience, testing, and reading the code, this is not possible. Twitch messages, internally, are not simple text... they are made up of "fragments" of specific purposes... some is just plain text, but there are also mentions (the current user and other users treated separately), links, emotes, etc... all of these are processed separately. When BTTV sees a mention fragment, it strips the username only out of the fragment data and matches against that, Hence, the "@" of a mention fragment is not part of the text that can be matched against... so it is not possible to do things like "@*". |
so matching by the character is not possible, but what about a systematic way to identify whether a chat entry has a username / mention in it? |
No, there is no way to achieve any kind of "selective" matching, not of mentions, anyway. The fragments are all converted to something "plain text ish", emotes to their code, links to plain text, mentions to the username only, etc, and then merged together with the plain text fragments, and then your keywords are matched against that merged text. The only type based matching the highlight system supports is matching the username of the sender (with the |
can you link me where matching happens in the code, im just curious |
The high level match occurs in onMessage at
|
Yeah I can see how it's not possible at the moment looks like there would have to be a new function like isReply that gets called a similar way with a new setting
im not a programmer so idk if theres a cleaner way |
following from this https://www.w3schools.com/jquery/traversing_find.asp I think the function would be
and maybe it would be better to have a separate if before the rest but idk |
Closes night#4272 Thanks to @Nareese for guidance Signed-off-by: Michael Pratt <mcpratt@pm.me>
using the strings '$@' for mentions and '$#' for links for the current message matching system instead of an independent setting Closes night#4272 Thanks to @Nareese for guidance Signed-off-by: Michael Pratt <mcpratt@pm.me>
using the strings '$@' for mentions and '$#' for links for the current message matching system instead of an independent setting forming one multiline if statement to cover all related features Closes night#4272 Thanks to @Nareese for guidance Signed-off-by: Michael Pratt <mcpratt@pm.me>
using the strings '$@' for mentions and '$#' for links for the current message matching system instead of an independent setting forming one multiline if statement to cover all related features Closes night#4272 Thanks to @Nareese for guidance Signed-off-by: Michael Pratt <mcpratt@pm.me>
using the strings '$@' for mentions and '$#' for emotes for the current message matching system instead of an independent setting forming one multiline if statement to cover all related features Closes night#4272 Thanks to @Nareese for guidance Signed-off-by: Michael Pratt <mcpratt@pm.me>
fixes night#4272 fixes night#4238 fixes night#4185 fixes night#655 fixes #267 fixes #141
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related issues or feature requests. |
I was just wondering if there was a way to highlight all mentions, any chat line with the @ symbol in it
The text was updated successfully, but these errors were encountered: