diff --git a/app/js/lang/lang.en.js b/app/js/lang/lang.en.js index 4bb2b0da..bab2f536 100644 --- a/app/js/lang/lang.en.js +++ b/app/js/lang/lang.en.js @@ -141,6 +141,7 @@ var lang={ "lang_hisdata_frcwarn":"Unfollow accounts will be shown.", "lang_hisdata_taketime":"It will take 30s ~ several minutes", "lang_hisdata_notonmisskey":"Misskey is unable to request.", + "lang_hisdata_key":"This user is proofed by {{set}}", //userdata/showOnTL.js "lang_showontl_movetxt":"This account was moved", "lang_showontl_movebtn":"Continue on the new account", diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index 5930feef..2860f8b4 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -143,6 +143,7 @@ var lang={ "lang_hisdata_frcwarn":"非フォローだけど絡みがある時に表示されます。", "lang_hisdata_taketime":"30秒から数分かかります", "lang_hisdata_notonmisskey":"このシステムはMisskeyにはありません。", + "lang_hisdata_key":"このユーザーの信頼性は{{set}}によって示されています", //userdata/showOnTL.js "lang_showontl_movetxt":"このアカウントは移行しています", "lang_showontl_movebtn":"移行先を見る", diff --git a/app/js/platform/end.js b/app/js/platform/end.js index 9d18fe07..4e9adaf2 100644 --- a/app/js/platform/end.js +++ b/app/js/platform/end.js @@ -35,8 +35,11 @@ }else if(tags){ if(tags[2]){ - tagShow(tags[2]); - Materialize.toast('Open in browser', 86400); + var acct_id=$a.parent().attr("data-acct"); + if(!acct_id){ + acct_id=0; + } + tl('tag',decodeURI(tags[2]),acct_id,'add') } }else if(ats){ console.log(ats); diff --git a/app/js/platform/first.js b/app/js/platform/first.js index 255b6cfc..a95edd06 100644 --- a/app/js/platform/first.js +++ b/app/js/platform/first.js @@ -32,6 +32,13 @@ function nl2br(str) { str = str.replace(/(\n|\r)/g, "
"); return str; } +function br2nl(str) { + if(!str){ + return ""; + } + str = str.replace(/
/g, "\r\n"); + return str; +} function formattime(date){ var str=date.getFullYear()+"-"; if(date.getMonth()+1<10){ diff --git a/app/js/tl/card.js b/app/js/tl/card.js index d9e981f3..b6c1395e 100644 --- a/app/js/tl/card.js +++ b/app/js/tl/card.js @@ -4,9 +4,9 @@ function additional(acct_id, tlid) { //メンション系 //$(".mention").attr("href", ""); - $(".mention").addClass("parsed"); + $("#timeline-container .mention").addClass("parsed"); - $(".hashtag").each(function(i, elem) { + $("#timeline-container .hashtag").each(function(i, elem) { var tags = $(this).attr("href").match( /https?:\/\/([-a-zA-Z0-9@.]+)\/tags\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/ ); @@ -17,8 +17,6 @@ function additional(acct_id, tlid) { } } - - }); //トゥートサムネ @@ -34,6 +32,7 @@ function additional(acct_id, tlid) { ); } }else{ + text="" var urls =[] } diff --git a/app/js/tl/dm.js b/app/js/tl/dm.js index 6732860a..c434c1ef 100644 --- a/app/js/tl/dm.js +++ b/app/js/tl/dm.js @@ -243,7 +243,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) { var id = toot.id; var home = ""; if (toot.account.locked) { - var locked = ' '; + var locked = ' '; } else { var locked = ""; } @@ -506,7 +506,7 @@ function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) { toot.account.acct + locked + '' + '
' + + '('+lang.lang_parse_clickcopyurl+')">' + date(toot.created_at, datetype) + '' + '
' + '
'+tickerdom+''; - var regExp = new RegExp(":" + shortcode + ":", "g"); - dis_name = dis_name.replace(regExp, emoji_url); - }); + if(toot.user.emojis){ + Object.keys(toot.user.emojis).forEach(function(key5) { + var emoji = toot.user.emojis[key5]; + var shortcode = emoji.name; + var emoji_url = ' :'+shortcode+': '; + var regExp = new RegExp(":" + shortcode + ":", "g"); + dis_name = dis_name.replace(regExp, emoji_url); + }); + } if (mix == "notf") { if (gif == "yes") { noticeavatar = toot.user.avatarUrl; @@ -182,14 +184,14 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { '">'; if (toot.type == "reply") { var what = lang.lang_parse_mentioned; - var icon = ''; + var icon = ''; noticeavatar=""; } else if (toot.type == "renote") { var what = lang.lang_misskeyparse_renoted; - var icon = ''; + var icon = ''; } else if (toot.type == "quote") { var what = lang.lang_misskeyparse_quoted; - var icon = ''; + var icon = ''; } else if (toot.type == "reaction") { var what = lang.lang_misskeyparse_reacted; var reactions={ @@ -224,7 +226,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { var icon = 'info'; } var noticetext = '' + date(toot.createdAt, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.createdAt, datetype) + ''+icon+'' + dis_name + @@ -290,7 +292,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { if (toot.renote) { var rebtxt = lang.lang_parse_btedsimple; var rticon = "fa-retweet light-blue-text"; - var notice = ''+ dis_name + "(@" + toot.user.username + + var notice = ''+ dis_name + "(@" + toot.user.username + ")
"; var boostback = "shared"; var uniqueid=toot.id; @@ -777,7 +779,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { toot.user.username + '
' + '
' + + '('+lang.lang_parse_clickcopyurl+')">' + date(toot.createdAt, datetype) + '' + '
' + '
'+tickerdom+'' + content + @@ -814,23 +816,23 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) { '
' + + '\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_replyto+'">
' + '
' + '
' + + ',\'misskey.xyz\',\'misskey.xyz\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_misskeyparse_renoteqt+'">' + '
' + '
' + + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'">' + '
' + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'">' +''+trans+ @@ -867,7 +869,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) { var ftxt=lang.lang_parse_followed; if(popup > 0 || popup==-1){ var notftext='' + date(toot.createdAt, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.createdAt, datetype) + ''+ftxt+'
'; var toot = toot.user; diff --git a/app/js/tl/notification.js b/app/js/tl/notification.js index 40b7b86c..f8b1d195 100644 --- a/app/js/tl/notification.js +++ b/app/js/tl/notification.js @@ -233,13 +233,13 @@ function notfCommon(acct_id, tlid, sys) { var ipc = electron.ipcRenderer; var os = electron.remote.process.platform; var options = { - body: ct+lang.lang_notf_new[lang], + body: ct+lang.lang_notf_new, icon: localStorage.getItem("prof_"+acct_id) }; if(os=="darwin"){ var n = new Notification('TheDesk:'+domain, options); }else{ - ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new[lang],localStorage.getItem("prof_"+acct_id)]); + ipc.send('native-notf', ['TheDesk:'+domain,ct+lang.lang_notf_new,localStorage.getItem("prof_"+acct_id)]); } } diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js index 09655679..54e73beb 100644 --- a/app/js/tl/parse.js +++ b/app/js/tl/parse.js @@ -236,9 +236,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { var icon = "fa-tasks purple-text"; } var noticetext = '' + date(toot.created_at, + 'absolute') + '('+lang.lang_parse_notftime+')">' + date(toot.created_at, datetype) + - '
' + dis_name + "(@" + toot.account.acct + ")"; @@ -334,7 +334,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { }else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){ rebtxt = "がしばいた"; } - var notice = ''+ dis_name + "(@" + toot.account.acct + + var notice = ''+ dis_name + "(@" + toot.account.acct + ")
"; var boostback = "shared"; var uniqueid=toot.id; @@ -387,7 +387,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { var divider = '
'; } if (toot.account.locked) { - var locked = ' '; + var locked = ' '; } else { var locked = ""; } @@ -735,7 +735,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) { poll=poll+'
'+escapeHTML(choice.title)+'('+choice.votes_count+')
'; }); poll='
'+poll+myvote+'' + + '">' + ended+ '
'; } templete = templete + '
' + + '('+lang.lang_parse_clickcopyurl+')">' + date(toot.created_at, datetype) + '' + '
' + '
'+tickerdom+'' + replyct + + '\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_replyto+'">' + replyct + '
' + '
' + toot.reblogs_count + '
' + '
' + + '\')" class="waves-effect waves-dark btn-flat actct" style="padding:0" title="'+lang.lang_parse_quote+'">' + '' + '
' + + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_del+'">' + '
' + ')" class="waves-effect waves-dark btn-flat" style="padding:0" title="'+lang.lang_parse_pin+'">' +''+trans+ @@ -833,7 +833,7 @@ function userparse(obj, auth, acct_id, tlid, popup) { var notf=false; } if (toot.locked) { - var locked = ' '; + var locked = ' '; } else { var locked = ""; } diff --git a/app/js/tl/poll.js b/app/js/tl/poll.js index 31daec0e..394579d2 100644 --- a/app/js/tl/poll.js +++ b/app/js/tl/poll.js @@ -111,7 +111,7 @@ function voteMastodonrefresh(acct_id,id){ poll=poll+'
'+choice.title+'('+choice.votes_count+')
'; }); poll=poll+myvote+'' + + '">' + date(json.expires_at, datetype) + ''; $('.vote_'+acct_id+'_'+json.id).html(poll) } diff --git a/app/js/ui/layout.js b/app/js/ui/layout.js index 389117f1..59a0a1b0 100644 --- a/app/js/ui/layout.js +++ b/app/js/ui/layout.js @@ -153,15 +153,15 @@ function parseColumn() { var animecss=""; } if(acct.type=="notf"){ - var exclude=lang.lang_excluded+':
'+ - ' '+ - ' '+ - ' '+ - ' '+ + var exclude=lang.lang_excluded+':
'+ + ' '+ + ' '+ + ' '+ + ' '+ '
'; }else if(acct.type=="home"){ var exclude='Off'+lang.lang_layout_excludingbt+'
'; }else{ var exclude=""; @@ -445,7 +445,7 @@ function coloradd(key,bg,txt){ function webviewParse(url,key,insert,icnsert,css){ var html = '