Add link to unknown media
This commit is contained in:
parent
3a06820f1e
commit
bfade31849
|
@ -193,6 +193,8 @@ var lang={
|
|||
"lang_parse_unvoted":"Show the result without voting",
|
||||
"lang_parse_endedvote":"Expired",
|
||||
"lang_parse_thread":"Show thread",
|
||||
"lang_parse_unknown":"Attached file",
|
||||
"lang_parse_nsfw":"NSFW media",
|
||||
//misskey
|
||||
"lang_misskeyparse_renote":"Repost",
|
||||
"lang_misskeyparse_renoteqt":"Renote",
|
||||
|
|
|
@ -195,6 +195,8 @@ var lang={
|
|||
"lang_parse_unvoted":"結果だけ見る",
|
||||
"lang_parse_endedvote":"終了済み",
|
||||
"lang_parse_thread":"会話を表示",
|
||||
"lang_parse_unknown":"添付ファイル",
|
||||
"lang_parse_nsfw":"閲覧注意",
|
||||
//misskey
|
||||
"lang_misskeyparse_renote":"再投稿",
|
||||
"lang_misskeyparse_renoteqt":"引用",
|
||||
|
|
|
@ -585,7 +585,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
var sense = "sensitive"
|
||||
var blur=media.blurhash
|
||||
if(blur){
|
||||
nsfwmes='<div class="nsfw-media">NSFW media</div>'
|
||||
nsfwmes='<div class="nsfw-media">'+lang.lang_parse_nsfw+'</div>'
|
||||
purl=parseBlur(blur)
|
||||
var sense=""
|
||||
}
|
||||
|
@ -593,12 +593,15 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
|||
var sense = ""
|
||||
var blur=null
|
||||
}
|
||||
if(media.type=="unknown"){
|
||||
viewer = viewer +'<a href="'+media.remote_url+'">['+lang.lang_parse_unknown+']</a> '
|
||||
}else{
|
||||
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',\'' +
|
||||
acct_id + '\')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
||||
'" data-type="' + media.type + '" class="img-parsed img-link" style="width:calc(' + cwdt + '% - 1px); height:'+imh+';"><img draggable="false" src="' +
|
||||
purl + '" class="' + sense +
|
||||
' toot-img pointer">'+nsfwmes+'</a>';
|
||||
|
||||
}
|
||||
});
|
||||
media_ids = media_ids.slice(0, -1) ;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue
Block a user