TheDesk Riina (ver.2)

This commit is contained in:
cutls
2018-02-18 16:29:06 +09:00
parent 0a234d14d4
commit 0ada3a03b0
321 changed files with 24494 additions and 32 deletions

View File

@@ -54,13 +54,14 @@ function mixtl(acct_id, tlid) {
Object.keys(locals).forEach(function(key2) {
if (!$("#timeline_" + tlid + " [toot-id=" + obj[0].id + "]").length &&
key2 < date(obj[0].created_at, 'unix')) {
$("#timeline_" + tlid + " .cvo").first().prepend(parse([obj[0]],
$("#timeline_" + tlid + " .cvo").first().before(parse([obj[0]],
'home', acct_id));
}
if (!$("#timeline_" + tlid + " [toot-id=" + toot.id + "]").length) {
if (key2 > tarunix) {
var local = locals[key2];
$("#timeline_" + tlid + " [toot-id=" + local + "]").append(parse(
console.log("#timeline_" + tlid + " [toot-id=" + local + "]");
$("#timeline_" + tlid + " [toot-id=" + local + "]").after(parse(
[toot], 'home', acct_id));
tarunix = 0;
}

View File

@@ -4,6 +4,7 @@ function parse(obj, mix, acct_id) {
var datetype = localStorage.getItem("datetype");
var nsfwtype = localStorage.getItem("nsfw");
var sent = localStorage.getItem("sentence");
var gif = localStorage.getItem("gif");
if (!sent) {
var sent = 500;
}
@@ -21,6 +22,9 @@ function parse(obj, mix, acct_id) {
if (!datetype) {
datetype = "absolute";
}
if(!gif){
var gif="yes";
}
var local = [];
Object.keys(obj).forEach(function(key) {
var toot = obj[key];
@@ -150,13 +154,13 @@ function parse(obj, mix, acct_id) {
var vis="";
var visen=toot.visibility;
if(visen=="public"){
var vis = '<i class="text-darken-3 material-icons gray sml pointer" title="公開(クリックでトゥートURLをコピー)" onclick="tootUriCopy(\''+toot.url+'\');">public</i>';
var vis = '<i class="text-darken-3 material-icons gray sml" title="公開">public</i>';
}else if(visen=="unlisted"){
var vis = '<i class="text-darken-3 material-icons blue-text pointer" title="未収載(クリックでトゥートURLをコピー)" onclick="tootUriCopy(\''+toot.url+'\');">lock_open</i>';
var vis = '<i class="text-darken-3 material-icons blue-text" title="未収載">lock_open</i>';
}else if(visen=="plivate"){
var vis = '<i class="text-darken-3 material-icons orange-text pointer" title="非公開(クリックでトゥートURLをコピー)" onclick="tootUriCopy(\''+toot.url+'\');">lock</i>';
var vis = '<i class="text-darken-3 material-icons orange-text" title="非公開">lock</i>';
}else if(visen=="direct"){
var vis = '<i class="text-darken-3 material-icons red-text pointer" title="ダイレクト(クリックでトゥートURLをコピー)" onclick="tootUriCopy(\''+toot.url+'\');">mail</i>';
var vis = '<i class="text-darken-3 material-icons red-text" title="ダイレクト">mail</i>';
}
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
var if_mine = "";
@@ -177,6 +181,12 @@ function parse(obj, mix, acct_id) {
var if_rt = "";
var rt_app = "";
}
//アニメ再生
if(gif=="yes"){
var avatar=toot.account.avatar;
}else{
var avatar=toot.account.avatar_static;
}
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
boostback + ' ' + fav_app + ' ' + rt_app +
' '+ hasmedia + '" toot-id="' + id + '" unixtime="' + date(obj[
@@ -184,7 +194,7 @@ function parse(obj, mix, acct_id) {
'<div class="area-notice"><span class="gray sharesta">' + notice + home + '</span></div>'+
'<div class="area-icon"><a onclick="udg(\'' + toot.account.id +
'\',' + acct_id + ');" user="' + toot.account.acct + '" class="udg">' +
'<img src="' + toot.account.avatar +
'<img src="' + avatar +
'" width="40" class="prof-img" user="' + toot.account.acct +
'"></a></div>'+
'<div class="area-display_name"><span class="user">' +
@@ -214,11 +224,11 @@ function parse(obj, mix, acct_id) {
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-trash-o"></i></a></div>' +
'<div class="action"><a onclick="details(\'' + toot.id + '\',' + acct_id +
')" class="waves-effect waves-dark btn-flat details" style="padding:0"><i class="text-darken-3 material-icons">more_vert</i></a></div>' +
'<div><span class="cbadge"><i class="fa fa-clock-o"></i>' +
'<div><span class="cbadge pointer" onclick="tootUriCopy(\''+toot.url+'\');" title="クリックでトゥートURLをコピー"><i class="fa fa-clock-o"></i>' +
date(toot.created_at, datetype) + '</span></div>' +
'<div><span class="cbadge" title="via ' + $.strip_tags(via) + '">via ' + via +
'</span></div></div></div>'+
'</div><div class="divider"></div>';
'<div class="divider"></div></div>';
});
if (mix == "mix") {
return [templete, local]

View File

@@ -45,6 +45,11 @@ function settings() {
Materialize.toast("デフォルトでボックスを隠すかを" + boxd + "に設定しました。", 3000);
}
localStorage.setItem("box", boxd);
var gifd = $("[name=gif]:checked").val();
if (gifd != localStorage.getItem("gif")) {
Materialize.toast("アイコンアニメーション再生を" + gifd + "に設定しました。", 3000);
}
localStorage.setItem("gif", gifd);
var sentd = $("#sentence").val();
if (sentd != localStorage.getItem("sentence")) {
Materialize.toast("指定行超過折りたたみを" + sentd + "行に設定しました。", 3000);
@@ -107,6 +112,12 @@ function load() {
}
$("#b_" + box).prop("checked", true);
var gif = localStorage.getItem("gif");
if (!gif) {
var gif = "yes";
}
$("#g_" + gif).prop("checked", true);
var sent = localStorage.getItem("sentence");
if (!sent) {
var sent = "500";