1
Fork 0

Compare commits

..

3 Commits

Author SHA1 Message Date
Bauke ecd91563d5
Fix topic votes not being hidden on topic pages. 2023-07-06 20:26:08 +02:00
Bauke 7e30c509e2
Add a small feature list to the readme. 2023-07-05 19:43:00 +02:00
Bauke 7933268d21
Mark hide topics as done. 2023-07-05 19:40:04 +02:00
3 changed files with 18 additions and 3 deletions

View File

@ -31,7 +31,7 @@ Some functionality has also been extended more:
And various new features have been added such as: And various new features have been added such as:
* [ ] Hide (and unhide) topics from the topic listing. [*WIP](https://gitlab.com/tildes-community/tildes-reextended/issues/3) * [x] Hide topics from the topic listing.
* [x] Hide your own and/or other people's vote counts. * [x] Hide your own and/or other people's vote counts.
* [x] Anonymize usernames. * [x] Anonymize usernames.
* [x] Assign unique colors to people's usernames. * [x] Assign unique colors to people's usernames.

View File

@ -5,6 +5,15 @@
[![Get Tildes ReExtended for Firefox](./images/mozilla-addons.png)](https://addons.mozilla.org/firefox/addon/tildes-reextended) [![Get Tildes ReExtended for Firefox](./images/mozilla-addons.png)](https://addons.mozilla.org/firefox/addon/tildes-reextended)
[![Get Tildes ReExtended for Chrome](./images/chrome-web-store.png)](https://chrome.google.com/webstore/detail/tildes-reextended/olmhgeajhikmikkdbbdgnmeobfbpefhj) [![Get Tildes ReExtended for Chrome](./images/chrome-web-store.png)](https://chrome.google.com/webstore/detail/tildes-reextended/olmhgeajhikmikkdbbdgnmeobfbpefhj)
## Features
* Autocompletion for group and user mentions.
* Dedicated "back to top" button.
* Hide topics matching link domains, usernames or titles.
* "Jump to new comment" button to automatically scroll to new comments.
* Assign labels to users to more easily recognize them.
* And more!
## Documentation ## Documentation
* If you'd like to know what the differences between Tildes Extended and Tildes ReExtended are, see [DIFFERENCES.md](DIFFERENCES.md). * If you'd like to know what the differences between Tildes Extended and Tildes ReExtended are, see [DIFFERENCES.md](DIFFERENCES.md).

View File

@ -100,9 +100,15 @@ function hideCommentVotes(data: HideVotesData, currentUser: string): number {
*/ */
function hideTopicVotes(data: HideVotesData, currentUser: string): number { function hideTopicVotes(data: HideVotesData, currentUser: string): number {
let count = 0; let count = 0;
for (const topic of querySelectorAll<HTMLElement>(".topic")) { for (const topic of querySelectorAll<HTMLElement>(".topic", ".topic-full")) {
const postedBySelf = topic.dataset.topicPostedBy === currentUser; let topicAuthor = topic.dataset.topicPostedBy;
if (topic.classList.contains("topic-full")) {
topicAuthor =
document.querySelector(".topic-full-byline .link-user")?.textContent ??
undefined;
}
const postedBySelf = topicAuthor === currentUser;
let vote: Element | undefined; let vote: Element | undefined;
// Select the vote number from the topic if we want to hide other's topics // Select the vote number from the topic if we want to hide other's topics