From f083c72106a1b5c5241046847cfcc7e8a323ac3c Mon Sep 17 00:00:00 2001 From: dimden <26517362+dimdenGD@users.noreply.github.com> Date: Wed, 24 Apr 2024 21:15:05 +0300 Subject: [PATCH] fix some rts appearing as RT @ --- manifest.json | 2 +- scripts/apis.js | 2 +- scripts/helpers.js | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index f6163451..b5b3c0b7 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Old Twitter Layout (2024)", "description": "__MSG_ext_description__", - "version": "1.8.3.8", + "version": "1.8.3.9", "manifest_version": 3, "homepage_url": "https://github.com/dimdenGD/OldTwitter", "background": { diff --git a/scripts/apis.js b/scripts/apis.js index 09996b44..48ee14e1 100644 --- a/scripts/apis.js +++ b/scripts/apis.js @@ -147,8 +147,8 @@ function parseTweet(res) { if(limitation) { result.tweet.legacy.limited_actions_text = limitation.prompt ? limitation.prompt.subtext.text : LOC.limited_tweet.message; } - result = result.tweet; } + if(result.tweet) result = result.tweet; if( result.quoted_status_result && result.quoted_status_result.result && diff --git a/scripts/helpers.js b/scripts/helpers.js index 338c25d2..ab2886a2 100644 --- a/scripts/helpers.js +++ b/scripts/helpers.js @@ -462,7 +462,6 @@ async function renderTweetBodyHTML(t, is_quoted) { }); } - console.log(t); if (t.entities.urls) { t.entities.urls.forEach(url => { index_map[url.indices[0]] = [url.indices[1], text =>