Fix: layout

This commit is contained in:
Cutls 2019-07-13 00:01:09 +09:00
parent 0290a6d918
commit 5fbd5aaf10

View File

@ -99,7 +99,9 @@ function details(id, acct_id, tlid, mode) {
if ($("#toot-this div").hasClass("cvo")) { if ($("#toot-this div").hasClass("cvo")) {
$("#toot-this").removeClass("cvo"); $("#toot-this").removeClass("cvo");
} else { } else {
$("#toot-this").addClass("cvo"); if(!$("#toot-this .cvo").hasClass("cvo")){
$("#toot-this").addClass("cvo");
}
} }
if (!$("#activator").hasClass("active")) { if (!$("#activator").hasClass("active")) {
$('#det-col').collapsible('open', 4); $('#det-col').collapsible('open', 4);
@ -125,14 +127,7 @@ function replyTL(id, acct_id) {
}) })
} }
} else { } else {
var start = "https://" + domain + "/api/v1/statuses/" + id; return false
var i = {
method: 'GET',
headers: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + at
},
}
} }
fetch(start, i).then(function (response) { fetch(start, i).then(function (response) {
return response.json(); return response.json();
@ -155,20 +150,6 @@ function replyTL(id, acct_id) {
if (json[rep]) { if (json[rep]) {
replyTL(json[rep][0], acct_id); replyTL(json[rep][0], acct_id);
} }
} else {
var templete = parse([json], '', acct_id, "", "", mute);
if (templete != "") {
$("#toot-reply .no-data").hide();
}
$("#toot-reply").prepend(templete);
$("#toot-reply .hide").html(lang.lang_details_filtered);
$("#toot-reply .by_filter").css("display", "block");
$("#toot-reply .by_filter").removeClass("hide");
jQuery("time.timeago").timeago();
var rep = "in_reply_to_id";
if (json[rep]) {
replyTL(json[rep], acct_id);
}
} }
}); });
@ -228,6 +209,14 @@ function context(id, acct_id) {
$("#toot-after .hide").html(lang.lang_details_filtered); $("#toot-after .hide").html(lang.lang_details_filtered);
$("#toot-after .by_filter").css("display", "block"); $("#toot-after .by_filter").css("display", "block");
$("#toot-after .by_filter").removeClass("hide"); $("#toot-after .by_filter").removeClass("hide");
var templete = parse(json.ancestors, '', acct_id, "", "", mute);
if (templete != "") {
$("#toot-reply .no-data").hide();
}
$("#toot-reply").prepend(templete);
$("#toot-reply .hide").html(lang.lang_details_filtered);
$("#toot-reply .by_filter").css("display", "block");
$("#toot-reply .by_filter").removeClass("hide");
jQuery("time.timeago").timeago(); jQuery("time.timeago").timeago();
} }