From 022565e1763b19adec102f0584fea16e19b6c243 Mon Sep 17 00:00:00 2001 From: cutls Date: Sat, 16 Nov 2019 22:55:49 +0900 Subject: [PATCH] Fix twitter link flied --- app/js/tl/card.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/js/tl/card.js b/app/js/tl/card.js index 0574ba51..17cb7e31 100644 --- a/app/js/tl/card.js +++ b/app/js/tl/card.js @@ -337,16 +337,20 @@ function cardHtmlShow(acct_id, id) { if (json.provider_name == 'Twitter') { var url = json.author_url var status = json.url.match(/^https:\/\/twitter.com\/[_a-zA-Z0-9-]+\/status\/([0-9]+)/); + var statusId = false if(status){ if(status.length > 0){ - status = status[1] + var statusId = status[1] } } - url = url + '/status/' + status - analyze = ` -
${json.author_name}
${json.description}${json.url}
- - ` + console.log(statusId) + if(statusId){ + url = json.url + analyze = ` +
${json.author_name}
${json.description}${json.url}
+ + ` + } } $('[toot-id=' + id + '] .additional').html(analyze) })