Automatically highlight user-defined text with Seek function (2019-09-22)
< Feedback on Text Highlight and Seek
I'm not sure what you mean about assigning a user name??
I didn't test the script on a dynamic page that would keep changing, so I'm not sure what happens in that scenario.
The highlighting is applied by inserting new HTML tags around the matching text, and then style rules color that tagged text. If a script in your tool copies the modified text to another place without cleaning out those tags, that might cause weird consequences.
If there are parts of your page that you want to exclude from highlighting there may be a workaround by adding another "and not" statement to the script. You can see where those are starting around line 377. However, I'm not very experienced with XPath syntax and have zero knowledge of your web app, so I'm not in a good position to give you specific language for the edit.
If you use the Inspector (right-click > Inspect Element) to look at the area that is getting mucked up, does it have any kind of unique identifier that might help in creating an exclusion?
Thank you for the quick reply and pointing me in the right direction. Thankfully they use a span tag around the author name so it was easy enough to add an ignore like you said. 'and not(ancestor::span[@id="author-name"]) ' +
is working well so far!
Small issue with youtube live chat
I love this script to help with moderating youtube chat, but there's a slight issue where it'll assign the wrong username to people's messages. I think it happens if a matching word is found in a username, then that username gets used a lot more incorrectly. Is there any workaround to this do you think? Love the script otherwise!