diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d4959e84..dcdb1da9 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -574,5 +574,6 @@ "show_quote_count": { "message": "Show quote count on tweets" }, "uploading": { "message": "Uploading" }, "finalization": { "message": "Finalization" }, - "processing": { "message": "Processing" } + "processing": { "message": "Processing" }, + "quotes": { "message": "Quotes" } } \ No newline at end of file diff --git a/_locales/ko/messages.json b/_locales/ko/messages.json index 755cfd2d..0283b74a 100644 --- a/_locales/ko/messages.json +++ b/_locales/ko/messages.json @@ -517,7 +517,7 @@ "mute_videos": { "message": "비디오를 기본적으로 음소거합니다" }, "dont_pause_videos": { "message": "스크롤 할 때 비디오를 일시정지 하지 않습니다" }, "delete_for_you":{ "message": "나에게서 삭제", "description":"DM Message Delete menu"}, - "show_user_previews_on_mobile": { "message": "계속 누를 시 유저 프로필을 보여줍니다 (이용에 방해될 수 있습니다)" }, + "show_user_previews_on_mobile": { "message": "계속 누를 시 유저 프로필을 표시합니다 (이용에 방해될 수 있습니다)" }, "separate_text": { "message": "텍스트를 분리하기", "description": "This option appears in three-dot menu of tweets only on mobile and makes text bigger and adds padding on top and bottom on tap" }, "leave_conversation": {"message":"대화를 삭제하시거나 나가실건가요?"}, "autotranslation_help1": {"message": "이 기능은 버튼을 직접 누를 필요 없이 자동으로 트윗을 찾아 번역을 하는 기능입니다."}, @@ -549,7 +549,7 @@ "manage_searches": { "message": "검색 관리하기" }, "add_search": { "message": "검색 추가하기" }, "pinned_searches": { "message": "고정된 검색" }, - "show_follower_counts_in_lists": { "message": "팔로우/팔로잉 페이지에서 팔로워의 수를 보여줍니다" }, + "show_follower_counts_in_lists": { "message": "팔로우/팔로잉 페이지에서 팔로워의 수를 표시합니다" }, "not_possible_to_see_unfollowers": { "message": "아쉽게도, 50,000 명 이상의 팔로워를 가진 계정에 대해 언팔로우를 볼 수 없습니다." }, "sort_by_follow_date": { "message": "팔로우 한 날짜 순 정렬 (부정확)" }, "sort_by_followers": { "message": "팔로워 수 순 정렬" }, @@ -566,13 +566,14 @@ "descending": { "message": "내림차순" }, "search_by_name": { "message": "이름으로 검색" }, "search_by_description": { "message": "자기소개로 검색" }, - "only_show_people_you_follow": { "message": "나를 팔로우 하는 사람만 보여줍니다" }, - "only_show_people_with_followers": { "message": "최소 $NUMBER$ 팔로워를 가진 사람만 보여줍니다", "placeholders": { "number": { "content": "-1" } } }, - "only_show_people_with_age": { "message": "$NUMBER$ 일 된 계정을 가진 사람만 보여줍니다", "placeholders": { "number": { "content": "-1" } } }, + "only_show_people_you_follow": { "message": "나를 팔로우 하는 사람만 표시합니다" }, + "only_show_people_with_followers": { "message": "최소 $NUMBER$ 팔로워를 가진 사람만 표시합니다", "placeholders": { "number": { "content": "-1" } } }, + "only_show_people_with_age": { "message": "$NUMBER$ 일 된 계정을 가진 사람만 표시합니다", "placeholders": { "number": { "content": "-1" } } }, "page": { "message": "페이지" }, "update": {"message": "업데이트" }, - "show_quote_count": { "message": "트윗의 인용 수를 보여줍니다" }, + "show_quote_count": { "message": "트윗의 인용 수를 표시합니다" }, "uploading": { "message": "업로드 중" }, "finalization": { "message": "마무리 하는 중" }, - "processing": { "message": "처리 중" } + "processing": { "message": "처리 중" }, + "quotes": { "message": "인용" } } \ No newline at end of file diff --git a/layouts/header/style.css b/layouts/header/style.css index 5bf28e72..977c79e5 100644 --- a/layouts/header/style.css +++ b/layouts/header/style.css @@ -1972,9 +1972,6 @@ emoji-picker { .tweet-interact-bookmark:before { content: "\f093"; } -.tweet-interact-quote:before { - content: "\f029"; -} .user-verified::after { content: "\f099"; color: #ee55a1; @@ -2170,10 +2167,6 @@ emoji-picker { .tweet-interact-bookmark:hover { color: #3b918a !important } -.tweet-interact-quote:hover:before, -.tweet-interact-quote:hover { - color: #913b8d !important -} .tweet-birdwatch { margin-top: 10px; @@ -2351,6 +2344,10 @@ rt.furigana { color: #00aced; content: "\f012" } +.ni-milestone:before { + color: #00aced; + content: "\f007" +} .wtf-user-name { max-width: 180px; } diff --git a/layouts/lists/style.css b/layouts/lists/style.css index d4d2f8ef..0e947b9d 100644 --- a/layouts/lists/style.css +++ b/layouts/lists/style.css @@ -652,6 +652,10 @@ a:hover, color: #5c913b; content: "\f006" } +.ni-milestone:before { + color: #00aced; + content: "\f007" +} .center-text { background-color: var(--background-color); diff --git a/layouts/search/style.css b/layouts/search/style.css index f8d52245..0fec4a04 100644 --- a/layouts/search/style.css +++ b/layouts/search/style.css @@ -644,6 +644,10 @@ a:hover, color: #5c913b; content: "\f006" } +.ni-milestone:before { + color: #00aced; + content: "\f007" +} .center-text { background-color: var(--background-color); diff --git a/scripts/helpers.js b/scripts/helpers.js index cd4d0ef1..1fc36f0b 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -1894,6 +1894,12 @@ async function appendTweet(t, timelineContainer, options = {}) { ${LOC.retweets.message} ${formatLargeNumber(t.retweet_count).replace(/\s/g, ',')} + ${vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ? + /*html*/` + ${LOC.quotes.message} + ${formatLargeNumber(t.quote_count).replace(/\s/g, ',')} + ` : + ''} ${vars.heartsNotStars ? LOC.likes.message : LOC.favorites.message} ${formatLargeNumber(t.favorite_count).replace(/\s/g, ',')} @@ -1915,9 +1921,6 @@ async function appendTweet(t, timelineContainer, options = {}) { ` : ''} ${options.mainTweet ? '' : formatLargeNumber(t.favorite_count).replace(/\s/g, ',')} - ${vars.showQuoteCount && options.mainTweet && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ? - /*html*/`${formatLargeNumber(t.quote_count).replace(/\s/g, ',')}` : - ''} ${(vars.showBookmarkCount || options.mainTweet) && typeof t.bookmark_count !== 'undefined' ? /*html*/`${formatLargeNumber(t.bookmark_count).replace(/\s/g, ',')}` : ''} @@ -2135,7 +2138,7 @@ async function appendTweet(t, timelineContainer, options = {}) { tweet.querySelector('.tweet-top').append(icon, span); } if(options.mainTweet) { - let likers = mainTweetLikers.slice(0, 8); + let likers = (vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ) ? mainTweetLikers.slice(0, 6) : mainTweetLikers.slice(0, 8); for(let i in likers) { let liker = likers[i]; let a = document.createElement('a'); @@ -2184,6 +2187,25 @@ async function appendTweet(t, timelineContainer, options = {}) { renderTrends(); currentLocation = location.pathname; }); + if(vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0){ + let quotesLink = tweet.getElementsByClassName('tweet-footer-stat-q')[0]; + quotesLink.addEventListener('click', e => { + e.preventDefault(); + document.getElementById('loading-box').hidden = false; + history.pushState({}, null, `https://twitter.com/${t.user.screen_name}/status/${t.id_str}/retweets/with_comments`); + updateSubpage(); + mediaToUpload = []; + linkColors = {}; + cursor = undefined; + seenReplies = []; + mainTweetLikers = []; + let id = location.pathname.match(/status\/(\d{1,32})/)[1]; + updateRetweetsWithComments(id); + renderDiscovery(); + renderTrends(); + currentLocation = location.pathname; + }); + } let repliesLink = tweet.getElementsByClassName('tweet-footer-stat-o')[0]; repliesLink.addEventListener('click', e => { e.preventDefault(); @@ -2257,7 +2279,6 @@ async function appendTweet(t, timelineContainer, options = {}) { const tweetInteractReply = tweet.getElementsByClassName('tweet-interact-reply')[0]; const tweetInteractRetweet = tweet.getElementsByClassName('tweet-interact-retweet')[0]; const tweetInteractFavorite = tweet.getElementsByClassName('tweet-interact-favorite')[0]; - const tweetInteractQuote = tweet.getElementsByClassName('tweet-interact-quote')[0]; const tweetInteractBookmark = tweet.getElementsByClassName('tweet-interact-bookmark')[0]; const tweetInteractMore = tweet.getElementsByClassName('tweet-interact-more')[0]; @@ -2619,9 +2640,6 @@ async function appendTweet(t, timelineContainer, options = {}) { }); } }; - if(tweetInteractQuote) tweetInteractQuote.addEventListener('click', () => { - tweetInteractRetweetMenuQuotes.click(); - }); if(tweetInteractBookmark) tweetInteractBookmark.addEventListener('click', switchBookmark); if(tweetInteractMoreMenuBookmark) tweetInteractMoreMenuBookmark.addEventListener('click', switchBookmark); if(tweetDeleteBookmark) tweetDeleteBookmark.addEventListener('click', async () => { @@ -3572,7 +3590,8 @@ const iconClasses = { 'bird_icon': 'ni-twitter', 'security_alert_icon': 'ni-alert', 'bell_icon': 'ni-bell', - 'list_icon': 'ni-list' + 'list_icon': 'ni-list', + 'milestone_icon': 'ni-milestone' }; let aRegex = /]*>([\s\S]*?)<\/a>/g; let replacerLocs; diff --git a/scripts/tweetviewer.js b/scripts/tweetviewer.js index 8231cf72..05d53938 100644 --- a/scripts/tweetviewer.js +++ b/scripts/tweetviewer.js @@ -1028,6 +1028,12 @@ class TweetViewer { ${LOC.retweets.message} ${formatLargeNumber(t.retweet_count).replace(/\s/g, ',')} + ${vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ? /*html*/ + ` + ${LOC.quotes.message} + ${formatLargeNumber(t.quote_count).replace(/\s/g, ',')} + ` : + ''} ${vars.heartsNotStars ? LOC.likes.message : LOC.favorites.message} ${formatLargeNumber(t.favorite_count).replace(/\s/g, ',')} @@ -1049,9 +1055,6 @@ class TweetViewer { ` : ''} ${options.mainTweet ? '' : formatLargeNumber(t.favorite_count).replace(/\s/g, ',')} - ${vars.showQuoteCount && options.mainTweet && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ? - /*html*/`${formatLargeNumber(t.quote_count).replace(/\s/g, ',')}` : - ''} ${(vars.showBookmarkCount || options.mainTweet) && typeof t.bookmark_count !== 'undefined' ? /*html*/`${formatLargeNumber(t.bookmark_count).replace(/\s/g, ',')}` : ''} @@ -1244,7 +1247,7 @@ class TweetViewer { tweet.querySelector('.tweet-top').append(icon, span); } if(options.mainTweet) { - let likers = this.mainTweetLikers.slice(0, 8); + let likers = (vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0 ) ? this.mainTweetLikers.slice(0, 6) : this.mainTweetLikers.slice(0, 8); for(let i in likers) { let liker = likers[i]; let a = document.createElement('a'); @@ -1289,6 +1292,23 @@ class TweetViewer { this.updateRetweets(id); this.currentLocation = location.pathname; }); + if(vars.showQuoteCount && typeof t.quote_count !== 'undefined' && t.quote_count > 0){ + let quotesLink = tweet.getElementsByClassName('tweet-footer-stat-q')[0]; + quotesLink.addEventListener('click', e => { + e.preventDefault(); + history.pushState({}, null, `https://twitter.com/${t.user.screen_name}/status/${t.id_str}/retweets/with_comments`); + this.updateSubpage(); + this.mediaToUpload = []; + this.excludeUserMentions = []; + this.linkColors = {}; + this.cursor = undefined; + this.seenReplies = []; + this.mainTweetLikers = []; + let id = location.pathname.match(/status\/(\d{1,32})/)[1]; + this.updateRetweetsWithComments(id); + this.currentLocation = location.pathname; + }); + } let repliesLink = tweet.getElementsByClassName('tweet-footer-stat-o')[0]; repliesLink.addEventListener('click', e => { e.preventDefault(); @@ -1345,7 +1365,6 @@ class TweetViewer { const tweetInteractReply = tweet.getElementsByClassName('tweet-interact-reply')[0]; const tweetInteractRetweet = tweet.getElementsByClassName('tweet-interact-retweet')[0]; const tweetInteractFavorite = tweet.getElementsByClassName('tweet-interact-favorite')[0]; - const tweetInteractQuote = tweet.getElementsByClassName('tweet-interact-quote')[0]; const tweetInteractBookmark = tweet.getElementsByClassName('tweet-interact-bookmark')[0]; const tweetInteractMore = tweet.getElementsByClassName('tweet-interact-more')[0]; @@ -1661,9 +1680,6 @@ class TweetViewer { }); } }; - if(tweetInteractQuote) tweetInteractQuote.addEventListener('click', () => { - tweetInteractRetweetMenuQuotes.click(); - }); if(tweetInteractBookmark) tweetInteractBookmark.addEventListener('click', switchBookmark); if(tweetInteractMoreMenuBookmark) tweetInteractMoreMenuBookmark.addEventListener('click', switchBookmark);