Skip to content
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

views/tweet: add .author-$user, .retweet-$user to classlist for adblock #718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/views/tweet.nim
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
divClass = "thread-last " & class

if not tweet.available:
divClass &= " author-" & tweet.user.username
return buildHtml(tdiv(class=divClass & "unavailable timeline-item")):
tdiv(class="unavailable-box"):
if tweet.tombstone.len > 0:
Expand All @@ -313,6 +314,9 @@ proc renderTweet*(tweet: Tweet; prefs: Prefs; path: string; class=""; index=0;
if tweet.retweet.isSome:
tweet = tweet.retweet.get
retweet = fullTweet.user.fullname
divClass &= " retweet-" & retweet

divClass &= " author-" & tweet.user.fullname

buildHtml(tdiv(class=("timeline-item " & divClass))):
if not mainTweet:
Expand Down