diff --git a/layouts/bookmarks/index.html b/layouts/bookmarks/index.html index 2aed5f2d..9c499cd7 100644 --- a/layouts/bookmarks/index.html +++ b/layouts/bookmarks/index.html @@ -89,7 +89,7 @@

__MSG_bookmarks__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/bookmarks/script.js b/layouts/bookmarks/script.js index cca88f4f..477d0d77 100644 --- a/layouts/bookmarks/script.js +++ b/layouts/bookmarks/script.js @@ -33,7 +33,7 @@ function renderUserData() { } document.getElementById('user-following').innerText = formatLargeNumber(user.friends_count).replace(/\s/g, ','); document.getElementById('user-followers').innerText = formatLargeNumber(user.followers_count).replace(/\s/g, ','); - document.getElementById('user-banner').src = user.profile_banner_url; + document.getElementById('user-banner').src = user.profile_banner_url ? user.profile_banner_url : 'https://abs.twimg.com/images/themes/theme1/bg.png'; document.getElementById('user-avatar').src = `${(user.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(user.id_str) % 7}_normal.png`): user.profile_image_url_https}`.replace('_normal.', '_400x400.'); document.getElementById('wtf-viewall').href = `https://twitter.com/i/connect_people?newtwitter=true&user_id=${user.id_str}`; document.getElementById('user-avatar-link').href = `https://twitter.com/${user.screen_name}`; @@ -69,10 +69,12 @@ async function renderBookmarks(cursor) { if(bookmarks.length === 0 && !cursor) { bookmarksContainer.innerHTML = `
${LOC.empty.message}
`; document.getElementById('delete-all').hidden = true; + document.getElementById('loading-box').hidden = true; return; } if(bookmarks.length === 0 && cursor) { end = true; + document.getElementById('loading-box').hidden = true; return; } for (let i = 0; i < bookmarks.length; i++) { diff --git a/layouts/bookmarks/style.css b/layouts/bookmarks/style.css index f52113c1..a5b29757 100644 --- a/layouts/bookmarks/style.css +++ b/layouts/bookmarks/style.css @@ -636,6 +636,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/header/script.js b/layouts/header/script.js index a1fe7c01..cde3222b 100644 --- a/layouts/header/script.js +++ b/layouts/header/script.js @@ -519,7 +519,12 @@ let userDataFunction = async user => { // util let firstTime = false; async function updateUnread() { - let unread = await API.notifications.getUnreadCount(firstTime); + let unread; + try { + unread = await API.notifications.getUnreadCount(firstTime); + } catch { + unread = { dm_unread_count: 0, ntab_unread_count: 0, total_unread_count: 0 }; + } if(!firstTime) firstTime = true; let dms = unread.dm_unread_count; let notifs = unread.ntab_unread_count; @@ -567,10 +572,20 @@ let userDataFunction = async user => { let accounts = (await API.account.getAccounts()).users; let accountsElement = document.getElementById('navbar-user-accounts'); accountsElement.innerHTML = ''; - accounts.forEach(account => { + accounts.forEach(async account => { + let accountUnreads; + try { + accountUnreads = await API.notifications.getUnreadCount(true, account.user_id); + } catch { + accountUnreads = { total_unread_count: 0 }; + } let accountElement = document.createElement('div'); accountElement.classList.add('navbar-user-account'); accountElement.innerHTML = ` ${account.screen_name}`; + let unreadCount = accountUnreads.total_unread_count >= 21 ? '20+' : accountUnreads.total_unread_count; + if (unreadCount != 0) { + accountElement.innerHTML += ` ${unreadCount}`; + } accountElement.addEventListener('click', async () => { if(account.screen_name === user.screen_name) return alert("You're already on this account!"); try { @@ -1230,7 +1245,7 @@ let userDataFunction = async user => { } messageEntry.name = escapeHTML(messageUsers[0].name); - messageEntry.screen_name = '@' + messageUsers[0].screen_name; + messageEntry.screen_name = messageUsers[0].screen_name; } else if (c.type == 'GROUP_DM') { //groups messageEntry.icon = c.avatar_image_https || chrome.runtime.getURL('/images/group.jpg'); messageEntry.name = c.name ? escapeHTML(c.name) : messageUsers.map(i => escapeHTML(i.name)).join(', ').slice(0, 128); @@ -1247,7 +1262,7 @@ let userDataFunction = async user => { } messageEntry.name = user.name; - messageEntry.screen_name = '@' + user.screen_name; + messageEntry.screen_name = user.screen_name; } let lastSenderWasUser = lastMessage.message_data && lastMessage.message_data.sender_id === user.id_str @@ -1308,7 +1323,7 @@ let userDataFunction = async user => {
${messageEntry.name} - ${messageEntry.screen_name} + ${messageEntry.screen_name ? '@' + messageEntry.screen_name : ''} ${timeElapsed(new Date(+lastMessage.time))}
${messageEntry.preview} @@ -1330,7 +1345,7 @@ let userDataFunction = async user => { modal.querySelector('.new-message-box').hidden = true; messageHeaderName.innerText = messageEntry.name; messageHeaderAvatar.src = messageEntry.icon; - if(messageUsers.length <= 1) messageHeaderLink.href = `https://twitter.com/${messageEntry.screen_name.startsWith('@') ? messageEntry.screen_name.slice(1) : messageEntry.screen_name}`; + if(messageUsers.length <= 1) messageHeaderLink.href = `https://twitter.com/${messageEntry.screen_name}`; setTimeout(() => { modal.querySelector(".message-new-input").focus(); if(tweetUrlToShareInDMs) modal.querySelector(".message-new-input").value = tweetUrlToShareInDMs; @@ -2943,7 +2958,7 @@ let userDataFunction = async user => { updateUnread(); updateAccounts(); updateInboxData(); - setInterval(updateAccounts, 60000*5); + setInterval(updateAccounts, 20000); setInterval(updateUnread, 20000); setInterval(updateInboxData, 20000); } diff --git a/layouts/header/style.css b/layouts/header/style.css index 5ebbfa98..b760ea29 100644 --- a/layouts/header/style.css +++ b/layouts/header/style.css @@ -627,6 +627,15 @@ input, textarea { margin-bottom: 3px; margin-right: 3px; } +.navbar-user-account-notifications { + background: var(--link-color); + color: var(--background-color) !important; + border-radius: 8px !important; + border: 1px solid var(--background-color); + padding: 3px 5px !important; + font-size: 10px !important; + display: inline !important; +} .search-result-item { display: block; diff --git a/layouts/history/index.html b/layouts/history/index.html index a56d7e44..e551789c 100644 --- a/layouts/history/index.html +++ b/layouts/history/index.html @@ -88,7 +88,7 @@

__MSG_history__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/history/style.css b/layouts/history/style.css index 0fb749b2..7605b9a8 100644 --- a/layouts/history/style.css +++ b/layouts/history/style.css @@ -636,6 +636,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/home/index.html b/layouts/home/index.html index 7b29d473..d16ec496 100644 --- a/layouts/home/index.html +++ b/layouts/home/index.html @@ -47,7 +47,7 @@

0

@@ -148,7 +148,7 @@

__MSG_trends__


__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/home/style.css b/layouts/home/style.css index 2f4b086a..69a38752 100644 --- a/layouts/home/style.css +++ b/layouts/home/style.css @@ -382,6 +382,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/itl/index.html b/layouts/itl/index.html index 9b98c888..3b8cdf05 100644 --- a/layouts/itl/index.html +++ b/layouts/itl/index.html @@ -89,7 +89,7 @@

__MSG_tweets__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/itl/script.js b/layouts/itl/script.js index c74d2bb8..bfcf3db1 100644 --- a/layouts/itl/script.js +++ b/layouts/itl/script.js @@ -35,7 +35,7 @@ function renderUserData() { } document.getElementById('user-following').innerText = formatLargeNumber(user.friends_count).replace(/\s/g, ','); document.getElementById('user-followers').innerText = formatLargeNumber(user.followers_count).replace(/\s/g, ','); - document.getElementById('user-banner').src = user.profile_banner_url; + document.getElementById('user-banner').src = user.profile_banner_url ? user.profile_banner_url : 'https://abs.twimg.com/images/themes/theme1/bg.png'; document.getElementById('user-avatar').src = `${(user.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(user.id_str) % 7}_normal.png`): user.profile_image_url_https}`.replace("_normal", "_400x400"); document.getElementById('wtf-viewall').href = `https://twitter.com/i/connect_people?newtwitter=true&user_id=${user.id_str}`; document.getElementById('user-avatar-link').href = `https://twitter.com/${user.screen_name}`; diff --git a/layouts/itl/style.css b/layouts/itl/style.css index afeead69..e7cdb434 100644 --- a/layouts/itl/style.css +++ b/layouts/itl/style.css @@ -635,6 +635,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/lists/index.html b/layouts/lists/index.html index 442f09c0..1acee9c3 100644 --- a/layouts/lists/index.html +++ b/layouts/lists/index.html @@ -96,7 +96,7 @@

0

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/lists/style.css b/layouts/lists/style.css index de76f97e..6be43f4e 100644 --- a/layouts/lists/style.css +++ b/layouts/lists/style.css @@ -461,6 +461,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/notifications/index.html b/layouts/notifications/index.html index c49a08e8..0578dfaf 100644 --- a/layouts/notifications/index.html +++ b/layouts/notifications/index.html @@ -69,7 +69,7 @@

__MSG_trends__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/notifications/style.css b/layouts/notifications/style.css index 1d7a007a..cd560010 100644 --- a/layouts/notifications/style.css +++ b/layouts/notifications/style.css @@ -433,6 +433,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/profile/index.html b/layouts/profile/index.html index 3c9b95d1..dd42dfb3 100644 --- a/layouts/profile/index.html +++ b/layouts/profile/index.html @@ -210,7 +210,7 @@

__MSG_dark_mode_vars__


__MSG_you_may_also_like__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/profile/style.css b/layouts/profile/style.css index 5beb8c5a..29bb24cd 100644 --- a/layouts/profile/style.css +++ b/layouts/profile/style.css @@ -454,6 +454,10 @@ body { cursor: pointer } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/search/index.html b/layouts/search/index.html index 1083547f..6e29f967 100644 --- a/layouts/search/index.html +++ b/layouts/search/index.html @@ -87,7 +87,7 @@

__MSG_trends__

__MSG_save_search__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/search/style.css b/layouts/search/style.css index c8a7efdf..4e46d421 100644 --- a/layouts/search/style.css +++ b/layouts/search/style.css @@ -450,6 +450,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/settings/index.html b/layouts/settings/index.html index 47715eda..7a8c3e8e 100644 --- a/layouts/settings/index.html +++ b/layouts/settings/index.html @@ -402,7 +402,7 @@

__MSG_advanced_options__


__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/settings/style.css b/layouts/settings/style.css index 82b8e7e2..b89b13e6 100644 --- a/layouts/settings/style.css +++ b/layouts/settings/style.css @@ -188,6 +188,10 @@ body { text-decoration: underline; } +#bulletpoint { + color: var(--light-gray) +} + .wtf-user { width:100%; display: inline-block; diff --git a/layouts/topics/index.html b/layouts/topics/index.html index 2a10da5b..1bfb46dd 100644 --- a/layouts/topics/index.html +++ b/layouts/topics/index.html @@ -98,7 +98,7 @@

__MSG_loading__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/topics/script.js b/layouts/topics/script.js index 226af444..4169c8d2 100644 --- a/layouts/topics/script.js +++ b/layouts/topics/script.js @@ -35,7 +35,7 @@ function renderUserData() { } document.getElementById('user-following').innerText = formatLargeNumber(user.friends_count).replace(/\s/g, ','); document.getElementById('user-followers').innerText = formatLargeNumber(user.followers_count).replace(/\s/g, ','); - document.getElementById('user-banner').src = user.profile_banner_url; + document.getElementById('user-banner').src = user.profile_banner_url ? user.profile_banner_url : 'https://abs.twimg.com/images/themes/theme1/bg.png'; document.getElementById('user-avatar').src = `${(user.default_profile_image && vars.useOldDefaultProfileImage) ? chrome.runtime.getURL(`images/default_profile_images/default_profile_${Number(user.id_str) % 7}_normal.png`): user.profile_image_url_https}`.replace("_normal", "_400x400"); document.getElementById('wtf-viewall').href = `https://twitter.com/i/connect_people?newtwitter=true&user_id=${user.id_str}`; document.getElementById('user-avatar-link').href = `https://twitter.com/${user.screen_name}`; diff --git a/layouts/topics/style.css b/layouts/topics/style.css index 21508c4c..2a7cebf1 100644 --- a/layouts/topics/style.css +++ b/layouts/topics/style.css @@ -651,6 +651,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/tweet/index.html b/layouts/tweet/index.html index 131e203d..4ceb2779 100644 --- a/layouts/tweet/index.html +++ b/layouts/tweet/index.html @@ -91,7 +91,7 @@

__MSG_trends__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ · __MSG_view_all__

diff --git a/layouts/tweet/style.css b/layouts/tweet/style.css index 4315c3d8..0a458d26 100644 --- a/layouts/tweet/style.css +++ b/layouts/tweet/style.css @@ -462,6 +462,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/layouts/unfollows/index.html b/layouts/unfollows/index.html index 8b2ecf7e..aa24db67 100644 --- a/layouts/unfollows/index.html +++ b/layouts/unfollows/index.html @@ -80,7 +80,7 @@

__MSG_unfollows__

__MSG_who_to_follow__


- __MSG_refresh__ · __MSG_view_all__ + __MSG_refresh__ ·· __MSG_view_all__

diff --git a/layouts/unfollows/style.css b/layouts/unfollows/style.css index 2584ffcc..7b7a4719 100644 --- a/layouts/unfollows/style.css +++ b/layouts/unfollows/style.css @@ -432,6 +432,10 @@ body { text-decoration: none } +#bulletpoint { + color: var(--light-gray) +} + a:hover, .tweet-header-info:hover, .tweet-body-text a:hover, diff --git a/scripts/apis.js b/scripts/apis.js index 69c77a74..8db61b49 100644 --- a/scripts/apis.js +++ b/scripts/apis.js @@ -121,7 +121,7 @@ function parseTweet(res) { if(!res.core) return; tweet.user = res.core.user_results.result.legacy; tweet.user.id_str = tweet.user_id_str; - if(res.core.user_results.result.is_blue_verified) { + if(res.core.user_results.result.is_blue_verified && !res.core.user_results.result.legacy.verified_type) { tweet.user.verified = true; tweet.user.verified_type = "Blue"; } @@ -145,7 +145,30 @@ function parseTweet(res) { if(result.legacy.quoted_status) { result.legacy.quoted_status.user = result.quoted_status_result.result.core.user_results.result.legacy; result.legacy.quoted_status.user.id_str = result.legacy.quoted_status.user_id_str; - if(result.quoted_status_result.result.core.user_results.result.is_blue_verified) { + if(result.quoted_status_result.result.core.user_results.result.is_blue_verified && !result.quoted_status_result.result.core.user_results.result.legacy.verified_type) { + result.legacy.quoted_status.user.verified = true; + result.legacy.quoted_status.user.verified_type = "Blue"; + } + tweetStorage[result.legacy.quoted_status.id_str] = result.legacy.quoted_status; + tweetStorage[result.legacy.quoted_status.id_str].cacheDate = Date.now(); + userStorage[result.legacy.quoted_status.user.id_str] = result.legacy.quoted_status.user; + userStorage[result.legacy.quoted_status.user.id_str].cacheDate = Date.now(); + } else { + console.warn("No retweeted quoted status", result); + } + } else if( + result.quoted_status_result && + result.quoted_status_result.result && + result.quoted_status_result.result.tweet && + result.quoted_status_result.result.tweet.legacy && + result.quoted_status_result.result.tweet.core && + result.quoted_status_result.result.tweet.core.user_results.result.legacy + ) { + result.legacy.quoted_status = result.quoted_status_result.result.tweet.legacy; + if(result.legacy.quoted_status) { + result.legacy.quoted_status.user = result.quoted_status_result.result.tweet.core.user_results.result.legacy; + result.legacy.quoted_status.user.id_str = result.legacy.quoted_status.user_id_str; + if(result.quoted_status_result.result.tweet.core.user_results.result.is_blue_verified && !result.core.user_results.result.verified_type) { result.legacy.quoted_status.user.verified = true; result.legacy.quoted_status.user.verified_type = "Blue"; } @@ -161,7 +184,7 @@ function parseTweet(res) { if(tweet.retweeted_status && result.core.user_results.result.legacy) { tweet.retweeted_status.user = result.core.user_results.result.legacy; tweet.retweeted_status.user.id_str = tweet.retweeted_status.user_id_str; - if(result.core.user_results.result.is_blue_verified) { + if(result.core.user_results.result.is_blue_verified && !result.core.user_results.result.legacy.verified_type) { tweet.retweeted_status.user.verified = true; tweet.retweeted_status.user.verified_type = "Blue"; } @@ -214,7 +237,7 @@ function parseTweet(res) { delete tweet.quoted_status; } else { tweet.quoted_status.user.id_str = tweet.quoted_status.user_id_str; - if(result.core.user_results.result.is_blue_verified) { + if(result.core.user_results.result.is_blue_verified && !result.core.user_results.result.legacy.verified_type) { tweet.quoted_status.user.verified = true; tweet.quoted_status.user.verified_type = "Blue"; } @@ -1128,17 +1151,20 @@ const API = { }, }, notifications: { - getUnreadCount: (cache = true) => { + getUnreadCount: (cache = true, userId = '') => { return new Promise((resolve, reject) => { chrome.storage.local.get(['unreadCount'], d => { - if(cache && d.unreadCount && Date.now() - d.unreadCount.date < 18000) { + if(cache && d.unreadCount && Date.now() - d.unreadCount.date < 30000 && d.unreadCount.userId == userId) { return resolve(d.unreadCount.data); } + if(userId == user.id_str) userId = ''; + let multiAuthHeader = userId ? { "x-web-auth-multi-user-id": userId } : {}; fetch(`https://twitter.com/i/api/2/badge_count/badge_count.json?supports_ntab_urt=1`, { headers: { "authorization": OLDTWITTER_CONFIG.public_token, "x-csrf-token": OLDTWITTER_CONFIG.csrf, "x-twitter-auth-type": "OAuth2Session", + ...multiAuthHeader }, credentials: "include" }).then(i => i.json()).then(data => { @@ -1151,7 +1177,8 @@ const API = { resolve(data); chrome.storage.local.set({unreadCount: { date: Date.now(), - data + data, + userId }}, () => {}); }).catch(e => { reject(e); diff --git a/scripts/helpers.js b/scripts/helpers.js index ac40f582..262dae1e 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -396,19 +396,30 @@ async function renderTweetBodyHTML(t, is_quoted) { hashflags = await API.discover.getHashflagsV2(); } - if(is_quoted) t = t.quoted_status + if(is_quoted) t = t.quoted_status; full_text_array = Array.from(t.full_text); if (t.entities.richtext) { t.entities.richtext.forEach(snippet => { - index_map[snippet.from_index] = [ - snippet.to_index, + //if i felt like it, id write a long-winded series of comments on how much i hate emojis. but i'll refrain + //and this *still* doesnt work properly with flag emojis + //im just glad it works at all + + let textBeforeSnippet = t.full_text.slice(0, snippet.from_index); + let emojisBeforeSnippet = textBeforeSnippet.match(/\p{Extended_Pictographic}/gu); + emojisBeforeSnippet = emojisBeforeSnippet ? emojisBeforeSnippet.length : 0; + + let fromIndex = snippet.from_index - emojisBeforeSnippet; + let toIndex = snippet.to_index - emojisBeforeSnippet; + + index_map[fromIndex] = [ + toIndex, text => { - let snippetText = escapeHTML(t.full_text.slice(snippet.from_index, snippet.to_index)); + let snippetText = escapeHTML(full_text_array.slice(fromIndex, toIndex).join('')); let startingTags = `${snippet.richtext_types.includes('Bold') ? '' : ''}${snippet.richtext_types.includes('Italic') ? '' : ''}`; let endingTags = `${snippet.richtext_types.includes('Bold') ? '' : ''}${snippet.richtext_types.includes('Italic') ? '' : ''}`; - + return `${startingTags}${snippetText}${endingTags}`; } ]; @@ -1756,14 +1767,15 @@ async function appendTweet(t, timelineContainer, options = {}) { if(t.withheld_in_countries && (t.withheld_in_countries.includes("XX") || t.withheld_in_countries.includes("XY"))) { full_text = ""; } - if(t.quoted_status_id_str && !t.quoted_status && options.mainTweet) { //t.quoted_status is undefined if the user blocked the quoter (this also applies to deleted/private tweets too, but it just results in original behavior then) + if(!t.quoted_status) { //t.quoted_status is undefined if the user blocked the quoter (this also applies to deleted/private tweets too, but it just results in original behavior then) try { if(t.quoted_status_result && t.quoted_status_result.result.tweet) { t.quoted_status = t.quoted_status_result.result.tweet.legacy; t.quoted_status.user = t.quoted_status_result.result.tweet.core.user_results.result.legacy; - } else { + }/* else if(t.quoted_status_id_str) { t.quoted_status = await API.tweet.getV2(t.quoted_status_id_str); - } + console.log(t.quoted_status); + }*/ } catch { t.quoted_status = undefined; } @@ -3744,7 +3756,7 @@ function renderNotification(n, options = {}) { let url = new URL(n.entry.content.notification.url.url); url.searchParams.append('newtwitter', true); - openInNewTab(url.href) + openInNewTab(url.href); } } }); diff --git a/scripts/injection.js b/scripts/injection.js index 18df95ef..cc373024 100644 --- a/scripts/injection.js +++ b/scripts/injection.js @@ -40,7 +40,7 @@ let pages = [ }, { name: "tweet", - paths: [/^\/[A-z-0-9-_]{1,15}\/status\/\d{5,32}(|\/likes|\/retweets|\/retweets\/with_comments|)$/] + paths: [/^\/[A-z-0-9-_]{1,15}\/status\/\d{2,32}(|\/likes|\/retweets|\/retweets\/with_comments|)$/] }, { name: "profile",