From 9d9bd10e156a6852234de256a3d2a6b1e3f45dc3 Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 31 Jul 2019 03:59:38 +0200 Subject: [PATCH] Change "tweets" to "posts" to avoid ublock hiding --- public/style.css | 4 ++-- src/views/profile.nim | 2 +- src/views/status.nim | 2 +- src/views/timeline.nim | 6 +++--- tests/base.py | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/style.css b/public/style.css index fa702be..7351c20 100644 --- a/public/style.css +++ b/public/style.css @@ -7,7 +7,7 @@ body { line-height: 1.3; } -#tweets { +#posts { background-color: #161616; } @@ -725,7 +725,7 @@ video { text-align: center; } -.profile-statlist .tweets { +.profile-statlist .posts { flex: 0.4 1 0; } diff --git a/src/views/profile.nim b/src/views/profile.nim index 9255acc..746ddd0 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -26,7 +26,7 @@ proc renderProfileCard*(profile: Profile): VNode = tdiv(class="profile-card-extra-links"): ul(class="profile-statlist"): - renderStat(profile.tweets, "tweets") + renderStat(profile.tweets, "posts") renderStat(profile.followers, "followers") renderStat(profile.following, "following") diff --git a/src/views/status.nim b/src/views/status.nim index a36e9f9..06ab7a2 100644 --- a/src/views/status.nim +++ b/src/views/status.nim @@ -19,7 +19,7 @@ proc renderReplyThread(thread: Thread): VNode = proc renderConversation*(conversation: Conversation): VNode = let hasAfter = conversation.after != nil - buildHtml(tdiv(class="conversation", id="tweets")): + buildHtml(tdiv(class="conversation", id="posts")): tdiv(class="main-thread"): if conversation.before != nil: tdiv(class="before-tweet thread-line"): diff --git a/src/views/timeline.nim b/src/views/timeline.nim index bacd326..17b3402 100644 --- a/src/views/timeline.nim +++ b/src/views/timeline.nim @@ -12,7 +12,7 @@ proc getTabClass(timeline: Timeline; tab: string): string = var classes = @["tab-item"] if timeline.query.isNone: - if tab == "tweets": + if tab == "posts": classes.add "active" elif $timeline.query.get().kind == tab: classes.add "active" @@ -22,7 +22,7 @@ proc getTabClass(timeline: Timeline; tab: string): string = proc renderSearchTabs(timeline: Timeline; profile: Profile): VNode = let link = "/" & profile.username buildHtml(ul(class="tab")): - li(class=timeline.getTabClass("tweets")): + li(class=timeline.getTabClass("posts")): a(href=link): text "Tweets" li(class=timeline.getTabClass("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 proc renderTweets(timeline: Timeline): VNode = - buildHtml(tdiv(id="tweets")): + buildHtml(tdiv(id="posts")): var threads: seq[string] for tweet in timeline.tweets: if tweet.threadId in threads: continue diff --git a/tests/base.py b/tests/base.py index 6538492..b40cabd 100644 --- a/tests/base.py +++ b/tests/base.py @@ -71,4 +71,4 @@ class BaseTestCase(BaseCase): def get_timeline_tweet(num=1): - return Tweet(f'#tweets > div:nth-child({num}) ') + return Tweet(f'#posts > div:nth-child({num}) ')