From a7d90d73cf81b4b63039ef8fab421b9772caac05 Mon Sep 17 00:00:00 2001 From: Ral Date: Sun, 26 Dec 2021 05:50:45 +0100 Subject: [PATCH] RC1 --- public/index.html | 2 +- ...867215635950a4dc8457db15814113c3c30337673.js} | 13 +++++++++++-- public/music/index.html | 2 +- public/nounicorn.png | Bin 0 -> 2424 bytes 4 files changed, 13 insertions(+), 4 deletions(-) rename public/{main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js => main.7f2a4e7588eff96e37a6730867215635950a4dc8457db15814113c3c30337673.js} (97%) create mode 100644 public/nounicorn.png diff --git a/public/index.html b/public/index.html index 6e606a4..107f8aa 100644 --- a/public/index.html +++ b/public/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/public/main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js b/public/main.7f2a4e7588eff96e37a6730867215635950a4dc8457db15814113c3c30337673.js similarity index 97% rename from public/main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js rename to public/main.7f2a4e7588eff96e37a6730867215635950a4dc8457db15814113c3c30337673.js index ee44641..450d2c9 100644 --- a/public/main.3912811afb38b9aa5c9ac95875c39d3b7df3012c509e83734e2ef6ad313d2a21.js +++ b/public/main.7f2a4e7588eff96e37a6730867215635950a4dc8457db15814113c3c30337673.js @@ -14,6 +14,16 @@ postsSorted = postsSorted.reverse().slice(0, numberTweets); return postsSorted; }; + var default_profile_image = () => "./nounicorn.png"; + var replace_default_image = (url) => { + let newUrl; + if (url === "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png" || url === "https://chaos.social/avatars/original/missing.png") { + newUrl = default_profile_image(); + } else { + newUrl = url; + } + return newUrl; + }; var tweet_author = (data, tweet) => { let authorId = tweet.author_id; let users = data.includes.users; @@ -22,11 +32,10 @@ return userName; }; var tweet_profile_image = (data, tweet) => { - const defaultProfileImageUrl = "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png"; let authorId = tweet.author_id; let users = data.includes.users; let author = users.find((item) => item.id === authorId); - let profileImageUrl = author !== void 0 ? author.profile_image_url : defaultProfileImageUrl; + let profileImageUrl = replace_default_image(author.profile_image_url); return profileImageUrl; }; var tweet_text = (tweet) => tweet.text; diff --git a/public/music/index.html b/public/music/index.html index 51cc6fb..ea99ca9 100644 --- a/public/music/index.html +++ b/public/music/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/public/nounicorn.png b/public/nounicorn.png new file mode 100644 index 0000000000000000000000000000000000000000..963e55a99817cbdf0444ad3deabc3b07ca54d23a GIT binary patch literal 2424 zcmV-;35WKHP);@)1b# zukR1M*q25HR;IS*hou2u!WlIGt$4?^fQ z$XIjKwo`rt@Vt%BzXCZB$S4qs6afFrnfR^>$xEtSW?;wkpch%NiTGX9!fT4efh8l> zo@D@UtR=tR8Yndm@>39}19Le*qUbPyO&7>-U=^kVgWZ|@Stp5qD*!wVEOt)*XHJv9 zT||xtHrt=`Pk2FoTJ8o$+aX`6agWH~0>1%J zm1-W7zwH)=sh|m#`al3Hf#wE?%H^u}=`faq$`qE`95GBb_V1C!)k0Pf)mYRHS_^m)3 zp9V;N7iizH0Q1>M*M;)}$fmG>4&lQ>a5K=@8Rk9m1_C<3dJsTx7lQ!8{2v6+f8K(~ zWDr1q`-^iPksrK(4lICA9zci#bb!0?XIuDXptGL^5T<}2fIw&axEBP_*Q-E$6V?Fz zi<4Ax!50CLyc{UigLjui0BosJsT8Q~zlGm+c@t>WkN&NACjgO;d?hOZkasGz2c8Mw zu_s(}j3OTcxB>E6LpO)Koh4ix?zkf1agWG27XieB zgM;o84=m^8|K88iyS0NMIFcV|kFvh+=uzb&^bOPz=lg^|2Ioa<`wN0M=}iH7mLmRzg+S0zqhR8_G>je zj)p;AwO9ZLTp)kO!j5~`fje*` zh0*_$#pd(Z90FOVN#5*H`zyAS|AFlxRK{_4ohXt3c-n)u-*RE}-?u)7p1uQEf^Z7N z_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