Change "tweets" to "posts" to avoid ublock hiding

This commit is contained in:
Zed 2019-07-31 03:59:38 +02:00
parent 4f7e0ffc22
commit 9d9bd10e15
5 changed files with 8 additions and 8 deletions

View file

@ -7,7 +7,7 @@ body {
line-height: 1.3; line-height: 1.3;
} }
#tweets { #posts {
background-color: #161616; background-color: #161616;
} }
@ -725,7 +725,7 @@ video {
text-align: center; text-align: center;
} }
.profile-statlist .tweets { .profile-statlist .posts {
flex: 0.4 1 0; flex: 0.4 1 0;
} }

View file

@ -26,7 +26,7 @@ proc renderProfileCard*(profile: Profile): VNode =
tdiv(class="profile-card-extra-links"): tdiv(class="profile-card-extra-links"):
ul(class="profile-statlist"): ul(class="profile-statlist"):
renderStat(profile.tweets, "tweets") renderStat(profile.tweets, "posts")
renderStat(profile.followers, "followers") renderStat(profile.followers, "followers")
renderStat(profile.following, "following") renderStat(profile.following, "following")

View file

@ -19,7 +19,7 @@ proc renderReplyThread(thread: Thread): VNode =
proc renderConversation*(conversation: Conversation): VNode = proc renderConversation*(conversation: Conversation): VNode =
let hasAfter = conversation.after != nil let hasAfter = conversation.after != nil
buildHtml(tdiv(class="conversation", id="tweets")): buildHtml(tdiv(class="conversation", id="posts")):
tdiv(class="main-thread"): tdiv(class="main-thread"):
if conversation.before != nil: if conversation.before != nil:
tdiv(class="before-tweet thread-line"): tdiv(class="before-tweet thread-line"):

View file

@ -12,7 +12,7 @@ proc getTabClass(timeline: Timeline; tab: string): string =
var classes = @["tab-item"] var classes = @["tab-item"]
if timeline.query.isNone: if timeline.query.isNone:
if tab == "tweets": if tab == "posts":
classes.add "active" classes.add "active"
elif $timeline.query.get().kind == tab: elif $timeline.query.get().kind == tab:
classes.add "active" classes.add "active"
@ -22,7 +22,7 @@ proc getTabClass(timeline: Timeline; tab: string): string =
proc renderSearchTabs(timeline: Timeline; profile: Profile): VNode = proc renderSearchTabs(timeline: Timeline; profile: Profile): VNode =
let link = "/" & profile.username let link = "/" & profile.username
buildHtml(ul(class="tab")): buildHtml(ul(class="tab")):
li(class=timeline.getTabClass("tweets")): li(class=timeline.getTabClass("posts")):
a(href=link): text "Tweets" a(href=link): text "Tweets"
li(class=timeline.getTabClass("replies")): li(class=timeline.getTabClass("replies")):
a(href=(link & "/replies")): text "Tweets & Replies" a(href=(link & "/replies")): text "Tweets & Replies"
@ -63,7 +63,7 @@ proc threadFilter(it: Tweet; tweetThread: string): bool =
it.retweet.isNone and it.reply.len == 0 and it.threadId == tweetThread it.retweet.isNone and it.reply.len == 0 and it.threadId == tweetThread
proc renderTweets(timeline: Timeline): VNode = proc renderTweets(timeline: Timeline): VNode =
buildHtml(tdiv(id="tweets")): buildHtml(tdiv(id="posts")):
var threads: seq[string] var threads: seq[string]
for tweet in timeline.tweets: for tweet in timeline.tweets:
if tweet.threadId in threads: continue if tweet.threadId in threads: continue

View file

@ -71,4 +71,4 @@ class BaseTestCase(BaseCase):
def get_timeline_tweet(num=1): def get_timeline_tweet(num=1):
return Tweet(f'#tweets > div:nth-child({num}) ') return Tweet(f'#posts > div:nth-child({num}) ')