TheDesk Akane (16.0.3) !unsolved!:av/BT countor bugs
This commit is contained in:
parent
131c4ae35e
commit
c21cacf180
|
@ -81,6 +81,38 @@ option {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@keyframes shake {
|
||||||
|
from,
|
||||||
|
to {
|
||||||
|
-webkit-transform: translate3d(0, 0, 0);
|
||||||
|
transform: translate3d(0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
10%,
|
||||||
|
30%,
|
||||||
|
50%,
|
||||||
|
70%,
|
||||||
|
90% {
|
||||||
|
-webkit-transform: translate3d(-10px, 0, 0);
|
||||||
|
transform: translate3d(-10px, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
20%,
|
||||||
|
40%,
|
||||||
|
60%,
|
||||||
|
80% {
|
||||||
|
-webkit-transform: translate3d(10px, 0, 0);
|
||||||
|
transform: translate3d(10px, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.shake {
|
||||||
|
display: inline-block;
|
||||||
|
animation-duration: 1s;
|
||||||
|
animation-fill-mode: both;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-name: shake;
|
||||||
|
}
|
||||||
code:before, .pre:before {
|
code:before, .pre:before {
|
||||||
content: "Code";
|
content: "Code";
|
||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
|
|
|
@ -391,4 +391,11 @@ p:not(:last-child){
|
||||||
}
|
}
|
||||||
.tl-box .via-hide{
|
.tl-box .via-hide{
|
||||||
display:none;
|
display:none;
|
||||||
|
}
|
||||||
|
.vote{
|
||||||
|
width: 100%;
|
||||||
|
border: 1px solid;
|
||||||
|
margin-top: 3px;
|
||||||
|
padding: 1px;
|
||||||
|
border-radius: 3px;
|
||||||
}
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
<script type="text/javascript" src="./js/common/modal.js"></script>
|
<script type="text/javascript" src="./js/common/modal.js"></script>
|
||||||
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
|
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
//Fav/BT数直せ
|
||||||
var ver="Akane (16.0.2)";
|
var ver="Akane (16.0.2)";
|
||||||
//betaを入れるとバージョンチェックしない
|
//betaを入れるとバージョンチェックしない
|
||||||
//GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html)
|
//GitHubに上げるときはindex.htmlをちゃんとする。(index.start.html)
|
||||||
|
|
|
@ -163,6 +163,14 @@ var lang_misskeyparse_home={
|
||||||
"ja":"ホーム",
|
"ja":"ホーム",
|
||||||
"en":"Home"
|
"en":"Home"
|
||||||
}
|
}
|
||||||
|
var lang_misskeyparse_followers={
|
||||||
|
"ja":"フォロワー",
|
||||||
|
"en":"Follower"
|
||||||
|
}
|
||||||
|
var lang_misskeyparse_specified={
|
||||||
|
"ja":"ユーザー指定",
|
||||||
|
"en":"Specified User"
|
||||||
|
}
|
||||||
var lang_misskeyparse_qt={
|
var lang_misskeyparse_qt={
|
||||||
"ja":"MisskeyのRenote(引用モード)中:Ctrl+Shift+Cでクリア",
|
"ja":"MisskeyのRenote(引用モード)中:Ctrl+Shift+Cでクリア",
|
||||||
"en":"Misskey renote(quote) mode:Ctrl+Shift+Enter to clear"
|
"en":"Misskey renote(quote) mode:Ctrl+Shift+Enter to clear"
|
||||||
|
|
|
@ -130,6 +130,9 @@
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
function escapeHTML(str) {
|
function escapeHTML(str) {
|
||||||
|
if(!str){
|
||||||
|
return "";
|
||||||
|
}
|
||||||
return str.replace(/&/g, '&')
|
return str.replace(/&/g, '&')
|
||||||
.replace(/</g, '<')
|
.replace(/</g, '<')
|
||||||
.replace(/>/g, '>')
|
.replace(/>/g, '>')
|
||||||
|
|
|
@ -117,4 +117,53 @@ function reaction(mode,id,acct_id,tlid){
|
||||||
$(".fav_"+id).toggleClass("yellow-text");
|
$(".fav_"+id).toggleClass("yellow-text");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
//Vote
|
||||||
|
function vote(acct_id,id,to){
|
||||||
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
|
var start = "https://" + domain + "/api/notes/polls/vote";
|
||||||
|
if(domain!="misskey.xyz"){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var httpreq = new XMLHttpRequest();
|
||||||
|
httpreq.open('POST', start, true);
|
||||||
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
httpreq.responseType = 'json';
|
||||||
|
httpreq.send(JSON.stringify({i:at,noteId:id,choice:to}));
|
||||||
|
httpreq.onreadystatechange = function() {
|
||||||
|
voterefresh(acct_id,id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function voterefresh(acct_id,id){
|
||||||
|
var httpreqd = new XMLHttpRequest();
|
||||||
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
|
var start = "https://" + domain + "/api/notes/show";
|
||||||
|
httpreqd.open('POST', start, true);
|
||||||
|
httpreqd.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
httpreqd.responseType = 'json';
|
||||||
|
httpreqd.send(JSON.stringify({i:at,noteId:id}));
|
||||||
|
httpreqd.onreadystatechange = function() {
|
||||||
|
if (httpreqd.readyState == 4) {
|
||||||
|
var json = httpreqd.response;
|
||||||
|
if(!json){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
var poll="";
|
||||||
|
if(json.poll){
|
||||||
|
var choices=json.poll.choices;
|
||||||
|
Object.keys(choices).forEach(function(keyc) {
|
||||||
|
var choice = choices[keyc];
|
||||||
|
if(choice.isVoted){
|
||||||
|
var myvote=twemoji.parse("✅");
|
||||||
|
}else{
|
||||||
|
var myvote="";
|
||||||
|
}
|
||||||
|
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+json.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
|
||||||
|
});
|
||||||
|
$(".vote_"+json.id).html(poll)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -164,13 +164,19 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
var memory = localStorage.getItem("notice-mem");
|
var memory = localStorage.getItem("notice-mem");
|
||||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
||||||
if (toot.type == "reply") {
|
if (toot.type == "reply") {
|
||||||
$(".notf-reply_" + acct_id).text($(".notf-reply_" + acct_id+":eq(0)").text()*1+1);
|
var replyct=localStorage.getItem("notf-reply_" + acct_id)
|
||||||
|
$(".notf-reply_" + acct_id).text(replyct*1+1);
|
||||||
|
localStorage.setItem("notf-reply_" + acct_id,replyct*1+1)
|
||||||
$(".notf-reply_" + acct_id).removeClass("hide")
|
$(".notf-reply_" + acct_id).removeClass("hide")
|
||||||
}else if (toot.type == "renote" || toot.type=="quote") {
|
}else if (toot.type == "renote" || toot.type=="quote") {
|
||||||
$(".notf-bt_" + acct_id).text($(".notf-bt_" + acct_id+":eq(0)").text()*1+1);
|
var btct=localStorage.getItem("notf-bt_" + acct_id)
|
||||||
|
$(".notf-bt_" + acct_id).text(btct*1+1);
|
||||||
|
localStorage.setItem("notf-bt_" + acct_id,btct*1+1)
|
||||||
$(".notf-bt_" + acct_id).removeClass("hide")
|
$(".notf-bt_" + acct_id).removeClass("hide")
|
||||||
}else if (toot.type == "reaction") {
|
}else if (toot.type == "reaction") {
|
||||||
$(".notf-fav_" + acct_id).text($(".notf-fav_" + acct_id+":eq(0)").text()*1+1);
|
var favct=localStorage.getItem("notf-fav_" + acct_id)
|
||||||
|
$(".notf-fav_" + acct_id).text(favct*1+1);
|
||||||
|
localStorage.setItem("notf-fav_" + acct_id,favct*1+1)
|
||||||
$(".notf-fav_" + acct_id).removeClass("hide")
|
$(".notf-fav_" + acct_id).removeClass("hide")
|
||||||
}
|
}
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
@ -188,7 +194,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
if(os=="darwin"){
|
if(os=="darwin"){
|
||||||
var n = new Notification('TheDesk:'+domain, options);
|
var n = new Notification('TheDesk:'+domain, options);
|
||||||
}else{
|
}else{
|
||||||
ipc.send('native-notf', ['TheDesk:'+domain,toot.user.name+"(" + toot.account.acct +")"+what+"\n\n"+$.strip_tags(toot.note.text),toot.user.avatarUrl]);
|
ipc.send('native-notf', ['TheDesk:'+domain,toot.user.name+"(" + toot.user.acct +")"+what+"\n\n"+$.strip_tags(toot.note.text),toot.user.avatarUrl]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$(".notf-icon_" + acct_id).addClass("red-text");
|
$(".notf-icon_" + acct_id).addClass("red-text");
|
||||||
|
@ -312,7 +318,17 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
}
|
}
|
||||||
//デフォ絵文字
|
//デフォ絵文字
|
||||||
if(content){
|
if(content){
|
||||||
content=content.replace(/(http(s)?:\/\/[\x21-\x7e]+)/gi, "<a href='$1' target='_blank'>$1</a>")
|
//MFM
|
||||||
|
content=content.replace(/^"([^"]+)"$/gmi, '<blockquote>$1</blockquote>')
|
||||||
|
content=content.replace(/`(.+)`/gi, '<code>$1</code>')
|
||||||
|
content=content.replace(/(http(s)?:\/\/[\x21-\x7e]+)/gi, '<a href="$1" target="_blank">$1</a>')
|
||||||
|
content=content.replace(/\(\(\((.+)\)\)\)/gi, '<span class="shake">$1</span>')
|
||||||
|
content=content.replace(/<motion>(.+)<\/motion>/gi, '<span class="shake">$1</span>')
|
||||||
|
content=content.replace(/\*\*\*([^*]+)\*\*\*/gi, '<span class="shake" style="font-size:200%">$1</span>')
|
||||||
|
content=content.replace(/\*\*([^*]+)\*\*/gi, '<b>$1</b>')
|
||||||
|
content=content.replace(/^(.+)\s検索$/gmi, '<div class="input-field"><i class="material-icons prefix">search</i><input type="text" style="width:calc( 60% - 80px);" name="q" value="$1" id="srcbox_'+toot.id+'"><label for="src" data-trans="src" class="">検索</label><button class="btn waves-effect indigo" style="width:40%;" data-trans-i="src" onclick="goGoogle(\''+toot.id+'\')">検索</button></div>')
|
||||||
|
content=content.replace(/\[(.+)\]\(<a href="(http(s)?:\/\/[\x21-\x7e]+)".+\)/gi,'<a href="$2" target="_blank">$1</a>');
|
||||||
|
|
||||||
content=twemoji.parse(content);
|
content=twemoji.parse(content);
|
||||||
}else{
|
}else{
|
||||||
content="";
|
content="";
|
||||||
|
@ -346,11 +362,20 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
} else {
|
} else {
|
||||||
var sense = ""
|
var sense = ""
|
||||||
}
|
}
|
||||||
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
|
if(media.type.indexOf("video") !== -1){
|
||||||
|
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
|
||||||
|
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
||||||
|
'" data-type="video" class="img-parsed"><video src="' +
|
||||||
|
purl + '" class="' + sense +
|
||||||
|
' toot-img pointer" style="max-width:100%; height:'+imh+'px;"></a></span>';
|
||||||
|
}else{
|
||||||
|
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
|
||||||
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
||||||
'" data-type="image" class="img-parsed"><img src="' +
|
'" data-type="image" class="img-parsed"><img src="' +
|
||||||
purl + '" class="' + sense +
|
purl + '" class="' + sense +
|
||||||
' toot-img pointer" style="width:' + cwdt + '%; height:'+imh+'px;"></a></span>';
|
' toot-img pointer" style="width:' + cwdt + '%; height:'+imh+'px;"></a></span>';
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
media_ids = media_ids.slice(0, -1) ;
|
media_ids = media_ids.slice(0, -1) ;
|
||||||
} else {
|
} else {
|
||||||
|
@ -455,7 +480,22 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
content=content.replace(regExp,'<span class="emp">'+word+"</span>");
|
content=content.replace(regExp,'<span class="emp">'+word+"</span>");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
//Poll
|
||||||
|
var poll="";
|
||||||
|
if(toot.poll){
|
||||||
|
var choices=toot.poll.choices;
|
||||||
|
Object.keys(choices).forEach(function(keyc) {
|
||||||
|
var choice = choices[keyc];
|
||||||
|
if(choice.isVoted){
|
||||||
|
var myvote=twemoji.parse("✅");
|
||||||
|
}else{
|
||||||
|
var myvote="";
|
||||||
|
}
|
||||||
|
poll=poll+'<div class="pointer vote" onclick="vote(\''+acct_id+'\',\''+toot.id+'\','+choice.id+')">'+choice.text+'('+choice.votes+''+myvote+')</div>';
|
||||||
|
});
|
||||||
|
poll='<div class="vote_'+toot.id+'">'+poll+'</div>';
|
||||||
|
}
|
||||||
//Reactions
|
//Reactions
|
||||||
if(toot.reactionCounts){
|
if(toot.reactionCounts){
|
||||||
if(toot.reactionCounts.like){
|
if(toot.reactionCounts.like){
|
||||||
|
@ -532,7 +572,10 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
}else{
|
}else{
|
||||||
var reacted="";
|
var reacted="";
|
||||||
}
|
}
|
||||||
content=nl2br(content);
|
content=nl2br(content);
|
||||||
|
if(!content || content==""){
|
||||||
|
content='<span class="gray">This post has no content. It may be media-only, private or deleted.</span>';
|
||||||
|
}
|
||||||
var trans="";
|
var trans="";
|
||||||
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
||||||
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + hasmedia + '" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="'+media_ids+' " unixtime="' + date(obj[
|
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + hasmedia + '" toot-id="' + id + '" unique-id="' + uniqueid + '" data-medias="'+media_ids+' " unixtime="' + date(obj[
|
||||||
|
@ -577,7 +620,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0">'+twemoji.parse("😥")+'</a><span class="re-confusedct">'+confused+
|
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0">'+twemoji.parse("😥")+'</a><span class="re-confusedct">'+confused+
|
||||||
'</span></span><span class="'+pudhide+' reaction re-pudding"><a onclick="reaction(\'pudding\',\'' + toot.id + '\',' + acct_id +
|
'</span></span><span class="'+pudhide+' reaction re-pudding"><a onclick="reaction(\'pudding\',\'' + toot.id + '\',' + acct_id +
|
||||||
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0">'+twemoji.parse("🍮")+'</a><span class="re-puddingct">'+pudding+
|
',\'' + tlid +'\')" class="waves-effect waves-dark btn-flat pointer" style="padding:0">'+twemoji.parse("🍮")+'</a><span class="re-puddingct">'+pudding+
|
||||||
'</span></div>' + mentions + tags + '</div>' +
|
'</span></div>'+poll + mentions + tags + '</div>' +
|
||||||
'<div class="area-vis"></div>'+
|
'<div class="area-vis"></div>'+
|
||||||
'<div class="area-actions '+mouseover+'">' +
|
'<div class="area-actions '+mouseover+'">' +
|
||||||
'<div class="action">'+vis+'</div>'+
|
'<div class="action">'+vis+'</div>'+
|
||||||
|
@ -658,7 +701,6 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
|
||||||
}else{
|
}else{
|
||||||
var dis_name=toot.name;
|
var dis_name=toot.name;
|
||||||
}
|
}
|
||||||
console.log(dis_name)
|
|
||||||
templete = templete +
|
templete = templete +
|
||||||
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +
|
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +
|
||||||
notftext +
|
notftext +
|
||||||
|
@ -682,4 +724,13 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
|
||||||
|
|
||||||
});
|
});
|
||||||
return templete;
|
return templete;
|
||||||
|
}
|
||||||
|
function goGoogle(id){
|
||||||
|
var val=$("#srcbox_"+id).val();
|
||||||
|
var url="https://google.com/search?q="+val;
|
||||||
|
const {
|
||||||
|
shell
|
||||||
|
} = require('electron');
|
||||||
|
|
||||||
|
shell.openExternal(url);
|
||||||
}
|
}
|
|
@ -245,12 +245,16 @@ function notfToggle(acct, tlid) {
|
||||||
}
|
}
|
||||||
function notfCanceler(acct){
|
function notfCanceler(acct){
|
||||||
$(".notf-reply_" + acct).text(0);
|
$(".notf-reply_" + acct).text(0);
|
||||||
|
localStorage.removeItem("notf-reply_" + acct_id)
|
||||||
$(".notf-reply_" + acct).addClass("hide");
|
$(".notf-reply_" + acct).addClass("hide");
|
||||||
$(".notf-fav_" + acct).text(0);
|
$(".notf-fav_" + acct).text(0);
|
||||||
|
localStorage.removeItem("notf-fav_" + acct_id)
|
||||||
$(".notf-fav_" + acct).addClass("hide");
|
$(".notf-fav_" + acct).addClass("hide");
|
||||||
$(".notf-bt_" + acct).text(0);
|
$(".notf-bt_" + acct).text(0);
|
||||||
|
localStorage.removeItem("notf-bt_" + acct_id)
|
||||||
$(".notf-bt_" + acct).addClass("hide");
|
$(".notf-bt_" + acct).addClass("hide");
|
||||||
$(".notf-follow_" + acct).text(0);
|
$(".notf-follow_" + acct).text(0);
|
||||||
|
localStorage.removeItem("notf-follow_" + acct_id)
|
||||||
$(".notf-follow_" + acct).addClass("hide");
|
$(".notf-follow_" + acct).addClass("hide");
|
||||||
$(".notf-icon_" + acct).removeClass("red-text");
|
$(".notf-icon_" + acct).removeClass("red-text");
|
||||||
}
|
}
|
||||||
|
@ -275,3 +279,4 @@ function allNotfRead(){
|
||||||
notfCanceler(key)
|
notfCanceler(key)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
allNotfRead()
|
|
@ -182,13 +182,19 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
var memory = localStorage.getItem("notice-mem");
|
var memory = localStorage.getItem("notice-mem");
|
||||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
||||||
if (toot.type == "mention") {
|
if (toot.type == "mention") {
|
||||||
$(".notf-reply_" + acct_id).text($(".notf-reply_" + acct_id).text()*1+1);
|
var replyct=localStorage.getItem("notf-reply_" + acct_id)
|
||||||
|
$(".notf-reply_" + acct_id).text(replyct*1+1);
|
||||||
|
localStorage.setItem("notf-reply_" + acct_id,replyct*1+1)
|
||||||
$(".notf-reply_" + acct_id).removeClass("hide")
|
$(".notf-reply_" + acct_id).removeClass("hide")
|
||||||
}else if (toot.type == "reblog") {
|
}else if (toot.type == "reblog") {
|
||||||
$(".notf-bt_" + acct_id).text($(".notf-bt_" + acct_id).text()*1+1);
|
var btct=localStorage.getItem("notf-bt_" + acct_id)
|
||||||
|
$(".notf-bt_" + acct_id).text(btct*1+1);
|
||||||
|
localStorage.setItem("notf-bt_" + acct_id,btct*1+1)
|
||||||
$(".notf-bt_" + acct_id).removeClass("hide")
|
$(".notf-bt_" + acct_id).removeClass("hide")
|
||||||
}else if (toot.type == "favourite") {
|
}else if (toot.type == "favourite") {
|
||||||
$(".notf-fav_" + acct_id).text($(".notf-fav_" + acct_id).text()*1+1);
|
var favct=localStorage.getItem("notf-fav_" + acct_id)
|
||||||
|
$(".notf-fav_" + acct_id).text(favct*1+1);
|
||||||
|
localStorage.setItem("notf-fav_" + acct_id,favct*1+1)
|
||||||
$(".notf-fav_" + acct_id).removeClass("hide")
|
$(".notf-fav_" + acct_id).removeClass("hide")
|
||||||
}
|
}
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
@ -603,6 +609,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
|
|
||||||
//オブジェクトパーサー(ユーザーデータ)
|
//オブジェクトパーサー(ユーザーデータ)
|
||||||
function userparse(obj, auth, acct_id, tlid, popup) {
|
function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
|
console.log("notf-get")
|
||||||
//独自ロケール
|
//独自ロケール
|
||||||
var locale = localStorage.getItem("locale");
|
var locale = localStorage.getItem("locale");
|
||||||
if(locale=="yes"){
|
if(locale=="yes"){
|
||||||
|
@ -612,6 +619,12 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
var datetype = localStorage.getItem("datetype");
|
var datetype = localStorage.getItem("datetype");
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var toot = obj[key];
|
var toot = obj[key];
|
||||||
|
if(!toot.username){
|
||||||
|
toot=toot.account;
|
||||||
|
var notf=true;
|
||||||
|
}else{
|
||||||
|
var notf=false;
|
||||||
|
}
|
||||||
if (toot.locked) {
|
if (toot.locked) {
|
||||||
var locked = ' <i class="fa fa-lock red-text"></i>';
|
var locked = ' <i class="fa fa-lock red-text"></i>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -629,8 +642,8 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
|
}else if(localStorage.getItem("domain_" + acct_id)=="mstdn.osaka" && !locale){
|
||||||
ftxt = "ツルまれました";
|
ftxt = "ツルまれました";
|
||||||
}
|
}
|
||||||
if(popup > 0 || popup==-1){
|
if(popup > 0 || popup==-1 || notf){
|
||||||
var notftext='<span class="cbadge"title="' + date(toot.created_at,
|
var notftext='<span class="cbadge" title="' + date(toot.created_at,
|
||||||
'absolute') + '('+lang_parse_notftime[lang]+')"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
|
'absolute') + '('+lang_parse_notftime[lang]+')"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
|
||||||
datetype) +
|
datetype) +
|
||||||
'</span>'+ftxt+'<br>';
|
'</span>'+ftxt+'<br>';
|
||||||
|
@ -644,7 +657,12 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
localStorage.setItem("notice-mem", notftext);
|
localStorage.setItem("notice-mem", notftext);
|
||||||
notftext = "";
|
notftext = "";
|
||||||
}
|
}
|
||||||
var dis_name=escapeHTML(toot.display_name);
|
if(toot.display_name){
|
||||||
|
var dis_name=escapeHTML(toot.display_name);
|
||||||
|
}else{
|
||||||
|
var dis_name=toot.username;
|
||||||
|
}
|
||||||
|
|
||||||
if(toot.emojis){
|
if(toot.emojis){
|
||||||
var actemojick = toot.emojis[0];
|
var actemojick = toot.emojis[0];
|
||||||
}else{
|
}else{
|
||||||
|
@ -661,13 +679,21 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
dis_name = dis_name.replace(regExp, emoji_url);
|
dis_name = dis_name.replace(regExp, emoji_url);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
dis_name=twemoji.parse(dis_name);
|
if(dis_name){
|
||||||
|
dis_name=twemoji.parse(dis_name);
|
||||||
|
}
|
||||||
|
if(toot.avatar){
|
||||||
|
var avatar=toot.avatar;
|
||||||
|
}else{
|
||||||
|
var avatar="./img/missing.svg";
|
||||||
|
}
|
||||||
|
|
||||||
templete = templete +
|
templete = templete +
|
||||||
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +
|
'<div class="cvo" style="padding-top:5px;" user-id="' + toot.id + '"><div class="area-notice">' +
|
||||||
notftext +
|
notftext +
|
||||||
'</div><div class="area-icon"><a onclick="udg(\'' + toot.id + '\',' +
|
'</div><div class="area-icon"><a onclick="udg(\'' + toot.id + '\',' +
|
||||||
acct_id + ');" user="' + toot.acct + '" class="udg">' +
|
acct_id + ');" user="' + toot.acct + '" class="udg">' +
|
||||||
'<img src="' + toot.avatar + '" width="40" class="prof-img" user="' + toot
|
'<img src="' + avatar + '" width="40" class="prof-img" user="' + toot
|
||||||
.acct + '"></a></div>' +
|
.acct + '"></a></div>' +
|
||||||
'<div class="area-display_name"><div class="flex-name"><span class="user">' +
|
'<div class="area-display_name"><div class="flex-name"><span class="user">' +
|
||||||
dis_name + '</span>' +
|
dis_name + '</span>' +
|
||||||
|
|
|
@ -143,6 +143,7 @@ function flw(user, more, acct_id) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -208,6 +209,7 @@ function fer(user, more, acct_id) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -329,6 +331,7 @@ function showMut(more, acct_id) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -429,6 +432,7 @@ function showReq(more, acct_id) {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
|
'Authorization': 'Bearer ' + at
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user