-
Notifications
You must be signed in to change notification settings - Fork 361
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
Make author names in forum quotes clickable #7364
base: master
Are you sure you want to change the base?
Make author names in forum quotes clickable #7364
Conversation
Github says there are conflicts in addons.json, I have no idea what it's talking about. |
Would you mind if I get this branch up to date with In the future, remember to base your branch off of |
Yeah, please do that. Thanks! |
Alright, you're all set! |
@WorldLanguages can you review? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addon isn't dynamic but it works fine.
This will need a little more discussion though since it's very similar to curator-link
and #4845.
const authors = document.getElementsByClassName("bb-quote-author"); | ||
|
||
for (const author of authors) { | ||
const authorName = author.textContent.match(/(?<=^)[\w-]{2,30}(?= wrote:$)/); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth making an API request to check if the user actually exists?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no
but you could add "TOLORS" to a blacklist if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if someone quotes the actual TOLORS user?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would make it inconsistent.
Sorry, I have limited availability to review addon PRs at the moment. But the code looks alright. |
This comment has been minimized.
This comment has been minimized.
The hidden link setting works dynamically now. |
Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine as its own addon and dynamic disable isn't a requirement.
Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com>
Co-authored-by: Samq64 <81489795+Samq64@users.noreply.github.com>
I've added dynamic disable. |
Can someone please review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think this would be better as part of curator-link
though.
Resolves #7363
Changes
Adds an addon which replaces all valid usernames in forum quotes with clickable links.
The addon also has an option for hidden links.
Tests
Tested in Arc for Windows 0.18.0 and Chrome 123.
I don't have firefox, can someone else test?
This addon can make links to non-existent users.
Does anyone know a way to check if a user exists?