Greasy Fork is available in English.

Highlight YouTube Commenter Mentions

Highlights usernames of previous commenters at the start of replies, so that they are clearly distinguishable from the actual response. Different arrows are added when the commenter of the preceding comment or the OP is mentioned. (Mentions of users that changed their display names cannot be recognized.)

Δημιουργός
h_h
Ημερήσιες εγκαταστάσεις
0
Σύνολο εγκαταστάσεων
106
Βαθμολογίες
1 0 0
Έκδοση
2019.01.12
Δημιουργήθηκε την
22/11/2018
Ενημερώθηκε την
12/01/2019
Άδεια
Apache License, Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0)
Εφαρμόζεται σε

(CURRENTLY NOT FUNCTIONING.)

 

 

 

How It Works

  • When you expand the replies of a top-level comment or click on a link to load more of them, YouTube loads them from a server and creates the respective page elements. The userscript will get notified of that.
  • Everytime this happens, the userscript gathers the displayed usernames, starting from the top-level comment and continuing with the replies.
  • Starting at the first of the recently added replies (speaking of page elements), the userscript checks whether the plain text at the beginning of a reply starts with any of the usernames that it gathered till that point. In every case, the processing of a reply stops before links, italic or bold text etc. Prefixes as "@" and "+" are recognized as part of the mention. As a requirement, certain text has to follow the mention, as a space or punctuation.
  • An up-pointing arrow with a circular tail is added to a mention when it refers to the commenter directly above. When this is not the case and the OP is mentioned, an up-left-pointing arrow will be added.
  • Mentions that are already linked by YouTube, no matter whether they are at the beginning of a reply text or not, will be styled with the same background color as plain-text mentions, which doesn't require any processing. However, no arrows will be added to those mentions.
  • The username that's written above a reply text will be made italic when it is that of the OP.

Limitations

  • Unfortunately, if a user changes their display name, the old username can't be highlighted, because it won't be found above any reply text anymore.
  • False positives are conceivable where a username, using regular words, matches the beginning of an actual reply text that is not supposed to mention anyone.
  • Also, when a username starts with the username of another commenter in the same thread, inaccurate highlighting may occur.

Latest Changes

  • The userscript now works on video pages you navigate to, not just when you first visit one.
  • Changed background color of highlightings of plain text to gray. Added small horizontal margins.
  • Changed arrow for signaling OP. Changed arrow position from before username to after username. Added arrow for signaling previous commenter.
  • Bug fixes
  • Possible performance improvement