diff --git a/app/js/tl/card.js b/app/js/tl/card.js index d4e525ba..06c7edb7 100644 --- a/app/js/tl/card.js +++ b/app/js/tl/card.js @@ -240,23 +240,11 @@ function cardHtml(json, acct_id, id) { "youtube.com", "youtu.be", "m.youtube.com", - "nicovideo.jp" + "nicovideo.jp", + "twitcasting.tv" ] var isHad = _.includes(ok, domain); - 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]+)/); - if(status){ - if(status.length > 0){ - status = status[1] - } - } - url = url + '/status/' + status - analyze = ` -
${json.author_name}
${json.description}${json.url}
- - ` - } else if (json.provider_name == 'pixiv') { + if (json.provider_name == 'pixiv') { if (json.image) { var pxvImg = `
` } - if (json.html) { + + if (json.html || json.provider_name == 'Twitter') { if(isHad) { var prved = `✅` @@ -294,11 +283,9 @@ function cardHtml(json, acct_id, id) { var prved = '' var title = '' } - analyze = - analyze + - ` + analyze =` ${lang.lang_parse_html}(${domain})${prved} -
` + ${analyze}
` } } return analyze @@ -346,6 +333,20 @@ function cardHtmlShow(acct_id, id) { ${lang.lang_cards_pip} ">picture_in_picture_alt` } + 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]+)/); + if(status){ + if(status.length > 0){ + status = status[1] + } + } + url = url + '/status/' + status + analyze = ` +
${json.author_name}
${json.description}${json.url}
+ + ` + } $('[toot-id=' + id + '] .additional').html(analyze) }) } diff --git a/app/view/make/language/en/main.json b/app/view/make/language/en/main.json index 849dd623..eaf1eb54 100644 --- a/app/view/make/language/en/main.json +++ b/app/view/make/language/en/main.json @@ -86,7 +86,7 @@ "lang_usetxtbox_reply": "Reply Mode. Ctrl+Shift+C to clear.", "lang_cards_check": " check", "lang_cards_pip": "PiP mode", - "lang_cards_link": "Trusted embed HTML by TheDesk(Twitter, Pixiv, nicovideo, YouTube, Spotify)", + "lang_cards_link": "Trusted embed HTML by TheDesk(Twitter, nicovideo, YouTube, Spotify, twitcasing)", "lang_details_nodata": "No data", "lang_details_filtered": "Filtered toot", "lang_details_embed": "Embed HTML is cliped.", diff --git a/app/view/make/language/ja/main.json b/app/view/make/language/ja/main.json index d900147e..77aedeae 100644 --- a/app/view/make/language/ja/main.json +++ b/app/view/make/language/ja/main.json @@ -86,7 +86,7 @@ "lang_usetxtbox_reply": "返信モードです。クリアするときはCtrl+Shift+Cを押してください。", "lang_cards_check": "チェック", "lang_cards_pip": "ながら観モード", - "lang_cards_link": "TheDeskが認証した埋め込みHTMLです(Twitter, Pixiv, nicovideo, YouTube, Spotify)", + "lang_cards_link": "TheDeskが認証した埋め込みHTMLです(Twitter, nicovideo, YouTube, Spotify, twitcasting)", "lang_details_nodata": "データなし", "lang_details_filtered": "フィルターされました。", "lang_details_embed": "埋め込みHTMLがコピーされました。",