TheDesk Miho (ver.5)
This commit is contained in:
parent
afc5721ffe
commit
3dcc1d7581
|
@ -1,5 +1,5 @@
|
||||||
/*共通CSS*/
|
/*共通CSS*/
|
||||||
|
body{overflow:hidden;}
|
||||||
.btn {
|
.btn {
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
text-transform: none;
|
text-transform: none;
|
||||||
|
@ -161,7 +161,7 @@ blockquote:before, .quote:before {
|
||||||
/*スクロールバー*/
|
/*スクロールバー*/
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 10px;
|
height: 5px;
|
||||||
background: rgba(0, 0, 0, 0.05);
|
background: rgba(0, 0, 0, 0.05);
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*トゥートボックス向けCSS*/
|
/*トゥートボックス向けCSS*/
|
||||||
#post-box {
|
#post-box {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
right: 3px;
|
right: 3px;
|
||||||
bottom: 3px;
|
bottom: 3px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
|
@ -8,12 +8,12 @@ iframe {
|
||||||
max-width:100%;
|
max-width:100%;
|
||||||
}
|
}
|
||||||
.box {
|
.box {
|
||||||
overflow-y: scroll;
|
overflow-y: hidden;
|
||||||
overflow-x: hidden;
|
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
.tl-box{ height:calc(100% - 40px); overflow-y:scroll; overflow-x:hidden }
|
||||||
@media screen and (max-width: 600px) {
|
@media screen and (max-width: 600px) {
|
||||||
#timeline-container {
|
#timeline-container {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -77,12 +77,16 @@ p {
|
||||||
.udg {
|
.udg {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.notice {
|
.notice-box {
|
||||||
top: -7px;
|
top: 0;
|
||||||
|
background-color:white;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
font-family: Open Sans;
|
font-family: Open Sans;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
width:100%;
|
||||||
|
z-index:1000;
|
||||||
|
height:60px;
|
||||||
}
|
}
|
||||||
#tools {
|
#tools {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
@ -143,3 +147,6 @@ p {
|
||||||
.blacktheme .mention {
|
.blacktheme .mention {
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
.blacktheme .notice-box {
|
||||||
|
background-color: #333333;
|
||||||
|
}
|
|
@ -23,7 +23,7 @@
|
||||||
<script type="text/javascript" src="./js/common/keyshortcut.js"></script>
|
<script type="text/javascript" src="./js/common/keyshortcut.js"></script>
|
||||||
<script type="text/javascript" src="./js/common/modal.js"></script>
|
<script type="text/javascript" src="./js/common/modal.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var ver="Miho (ver.4[fixed])";
|
var ver="Miho (ver.5)";
|
||||||
//betaを入れるとバージョンチェックしない
|
//betaを入れるとバージョンチェックしない
|
||||||
//var ver="beta";
|
//var ver="beta";
|
||||||
var acct_id=0;
|
var acct_id=0;
|
||||||
|
@ -323,7 +323,7 @@ var tlid=0;
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- Modal Structure Image-->
|
<!-- Modal Structure Image-->
|
||||||
<div id="imagemodal" class="modal modal-fixed-footer" style="margin-top:-10%">
|
<div id="imagemodal" class="modal modal-fixed-footer">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div id="imagewrap">
|
<div id="imagewrap">
|
||||||
<img src="" id="imgmodal">
|
<img src="" id="imgmodal">
|
||||||
|
|
|
@ -10,6 +10,16 @@ $(function($) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Esc:消す
|
||||||
|
if (e.keyCode === 27) {
|
||||||
|
hide();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//Esc:消す
|
||||||
|
if (e.keyCode === 116) {
|
||||||
|
location.href = "index.html";
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//input/textareaにフォーカスなし時
|
//input/textareaにフォーカスなし時
|
||||||
if (!hasFocus && !hasFocus2) {
|
if (!hasFocus && !hasFocus2) {
|
||||||
//X:開閉
|
//X:開閉
|
||||||
|
@ -74,11 +84,6 @@ $(function($) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//F5:スーパーリロード?
|
|
||||||
if (e.keyCode === 116) {
|
|
||||||
location.href = "index.html"
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//37,39
|
//37,39
|
||||||
if (e.keyCode === 37) {
|
if (e.keyCode === 37) {
|
||||||
|
|
3
app/js/common/materialize.js
vendored
3
app/js/common/materialize.js
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
//Warning!!: This is edited by CutlsP. It's not raw file.
|
||||||
/*!
|
/*!
|
||||||
* Materialize v0.100.2 (http://materializecss.com)
|
* Materialize v0.100.2 (http://materializecss.com)
|
||||||
* Copyright 2014-2017 Materialize
|
* Copyright 2014-2017 Materialize
|
||||||
|
@ -1863,7 +1864,7 @@ if (Vel) {
|
||||||
complete: undefined,
|
complete: undefined,
|
||||||
dismissible: true,
|
dismissible: true,
|
||||||
startingTop: '4%',
|
startingTop: '4%',
|
||||||
endingTop: '10%'
|
endingTop: '0%'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,7 +44,11 @@ function login(url) {
|
||||||
localStorage.setItem("client_secret", json["client_secret"]);
|
localStorage.setItem("client_secret", json["client_secret"]);
|
||||||
$("#auth").show();
|
$("#auth").show();
|
||||||
$("#masara").hide();
|
$("#masara").hide();
|
||||||
window.open(auth);
|
const {
|
||||||
|
shell
|
||||||
|
} = require('electron');
|
||||||
|
|
||||||
|
shell.openExternal(auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -171,7 +171,11 @@ function login(url) {
|
||||||
localStorage.setItem("client_secret", json["client_secret"]);
|
localStorage.setItem("client_secret", json["client_secret"]);
|
||||||
$("#auth").show();
|
$("#auth").show();
|
||||||
$("#add").hide();
|
$("#add").hide();
|
||||||
window.open(auth);
|
const {
|
||||||
|
shell
|
||||||
|
} = require('electron');
|
||||||
|
|
||||||
|
shell.openExternal(auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,10 @@ function fav(id, acct_id) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
console.log(json);
|
||||||
$("#pub_" + id + " .fav_ct").text(json.favourites_count);
|
$("[toot-id=" + id + "] .fav_ct").text(json.favourites_count);
|
||||||
if (!json.reblog) {
|
if (!json.reblog) {
|
||||||
$("#pub_" + id + " .rt_ct").text(json.reblogs_count - 1);
|
|
||||||
} else {
|
} else {
|
||||||
$("#pub_" + id + " .rt_ct").text(json.reblog.reblogs_count);
|
$("[toot-id=" + id + "] .rt_ct").text(json.reblog.reblogs_count);
|
||||||
}
|
}
|
||||||
if ($("#pub_" + id).hasClass("faved")) {
|
if ($("#pub_" + id).hasClass("faved")) {
|
||||||
$("#pub_" + id).removeClass("faved");
|
$("#pub_" + id).removeClass("faved");
|
||||||
|
@ -63,11 +62,16 @@ function rt(id, acct_id) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
console.log(json);
|
||||||
$("#pub_" + id + " .fav_ct").text(json.favourites_count);
|
$("[toot-id=" + id + "] .fav_ct").text(json.favourites_count);
|
||||||
if (!json.reblog) {
|
if (!json.reblog) {
|
||||||
$("#pub_" + id + " .rt_ct").text(json.reblogs_count - 1);
|
if(flag=="unreblog"){
|
||||||
|
var rt=json.reblogs_count - 1;
|
||||||
}else{
|
}else{
|
||||||
$("#pub_" + id + " .rt_ct").text(json.reblog.reblogs_count);
|
var rt=json.reblogs_count + 1;
|
||||||
|
}
|
||||||
|
$("[toot-id=" + id + "] .rt_ct").text(rt);
|
||||||
|
} else {
|
||||||
|
$("[toot-id=" + id + "] .rt_ct").text(json.reblog.reblogs_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($("#pub_" + id).hasClass("rted")) {
|
if ($("#pub_" + id).hasClass("rted")) {
|
||||||
|
@ -86,6 +90,7 @@ function follow(acct_id) {
|
||||||
var acct_id = $('#his-data').attr("use-acct");
|
var acct_id = $('#his-data').attr("use-acct");
|
||||||
}
|
}
|
||||||
var id = $("#his-data").attr("user-id");
|
var id = $("#his-data").attr("user-id");
|
||||||
|
var remote = $("#his-data").attr("remote");
|
||||||
if ($("#his-data").hasClass("following")) {
|
if ($("#his-data").hasClass("following")) {
|
||||||
var flag = "unfollow";
|
var flag = "unfollow";
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,14 +98,21 @@ function follow(acct_id) {
|
||||||
}
|
}
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
var at = localStorage.getItem(domain + "_at");
|
var at = localStorage.getItem(domain + "_at");
|
||||||
|
if(remote=="true" && flag=="follow"){
|
||||||
|
var start = "https://" + domain + "/api/v1/follows";
|
||||||
|
var user=$("#his-acct").text();
|
||||||
|
var ent={"uri":user}
|
||||||
|
}else{
|
||||||
var start = "https://" + domain + "/api/v1/accounts/" + id + "/" + flag;
|
var start = "https://" + domain + "/api/v1/accounts/" + id + "/" + flag;
|
||||||
|
var ent={}
|
||||||
|
}
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'content-type': 'application/json',
|
'content-type': 'application/json',
|
||||||
'Authorization': 'Bearer ' + at
|
'Authorization': 'Bearer ' + at
|
||||||
},
|
},
|
||||||
body: JSON.stringify({})
|
body: JSON.stringify(ent)
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
|
|
|
@ -48,6 +48,17 @@ function additional(acct_id, tlid) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//Markdownイメージビューワー
|
||||||
|
$("#timeline_" + tlid + " .toot a:not(.img-parsed):has(img)").each(function(i, elem) {
|
||||||
|
var ilink=$(this).attr("href");
|
||||||
|
var id = $(this).parents('.cvo').attr("toot-id");
|
||||||
|
$(this).attr("href","#");
|
||||||
|
$(this).attr("onclick","imgv('"+id+"','"+i+"')");
|
||||||
|
$(this).attr("data-type","image");
|
||||||
|
$(this).attr("id",id+"-image-"+i);
|
||||||
|
$(this).attr("data-url",ilink);
|
||||||
|
$(this).addClass("img-parsed");
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//各TL上方のLink[On/Off]
|
//各TL上方のLink[On/Off]
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
function mixtl(acct_id, tlid) {
|
function mixtl(acct_id, tlid) {
|
||||||
var type = "mix";
|
var type = "mix";
|
||||||
localStorage.removeItem("morelock")
|
localStorage.removeItem("morelock")
|
||||||
$("#notice_" + tlid).text("Integrated TL");
|
|
||||||
localStorage.setItem("now", type);
|
localStorage.setItem("now", type);
|
||||||
todo("Integrated TL Loading...(Local)");
|
todo("Integrated TL Loading...(Local)");
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
@ -169,6 +168,7 @@ function mixmore(tlid) {
|
||||||
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
||||||
var start = "https://" + domain +
|
var start = "https://" + domain +
|
||||||
"/api/v1/timelines/public?local=true&max_id=" + sid;
|
"/api/v1/timelines/public?local=true&max_id=" + sid;
|
||||||
|
console.log(start);
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -133,8 +133,23 @@ function parseNotf(obj, popup, tlid, acct_id) {
|
||||||
}
|
}
|
||||||
var viewer = "";
|
var viewer = "";
|
||||||
var youtube = "";
|
var youtube = "";
|
||||||
|
var emojick = toot.emojis[0];
|
||||||
|
//絵文字があれば
|
||||||
|
var content=toot.content
|
||||||
|
if (emojick) {
|
||||||
|
Object.keys(toot.emojis).forEach(function(key5) {
|
||||||
|
var emoji = toot.emojis[key5];
|
||||||
|
var shortcode = emoji.shortcode;
|
||||||
|
var emoji_url = '<img src="' + emoji.url +
|
||||||
|
'" style="width:2em" class="emoji-img">';
|
||||||
|
var regExp = new RegExp(":" + shortcode + ":", "g");
|
||||||
|
content = content.replace(regExp, emoji_url);
|
||||||
|
});
|
||||||
|
}
|
||||||
var mediack = toot.media_attachments[0];
|
var mediack = toot.media_attachments[0];
|
||||||
|
//メディアがあれば
|
||||||
if (mediack) {
|
if (mediack) {
|
||||||
|
var cwdt=100/toot.media_attachments.length
|
||||||
Object.keys(toot.media_attachments).forEach(function(key2) {
|
Object.keys(toot.media_attachments).forEach(function(key2) {
|
||||||
var media = toot.media_attachments[key2];
|
var media = toot.media_attachments[key2];
|
||||||
var purl = media.preview_url;
|
var purl = media.preview_url;
|
||||||
|
@ -144,10 +159,8 @@ function parseNotf(obj, popup, tlid, acct_id) {
|
||||||
} else {
|
} else {
|
||||||
var sense = ""
|
var sense = ""
|
||||||
}
|
}
|
||||||
viewer = viewer + '<a onclick="imgv(\'' + url + '\',\'' + toot.account
|
viewer = viewer + '<a onclick="imgv(\''+id+'\',\''+key2+'\')" id="'+id+'-image-'+key2+'" data-url="'+url+'" data-type="'+media.type+'" class="img-parsed"><img src="' + purl + '" class="' + sense +
|
||||||
.acct + '\',\'' + media.type + '\')"><img src="' + purl + '" class="' +
|
' toot-img pointer" style="width:'+cwdt+'%"></a></span>';
|
||||||
sense +
|
|
||||||
'" width="250" style="object-fit: cover; width: 100%; height: 200px;"></a></span>';
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
viewer = "";
|
viewer = "";
|
||||||
|
@ -224,7 +237,7 @@ function parseNotf(obj, popup, tlid, acct_id) {
|
||||||
'<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> @' +
|
'<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"> @' +
|
||||||
toot.account.acct + locked + '</div>' +
|
toot.account.acct + locked + '</div>' +
|
||||||
'</div>' +
|
'</div>' +
|
||||||
'<span class="toot ' + spoiler + '">' + toot.content +
|
'<span class="toot ' + spoiler + '">' + content +
|
||||||
'</span><span class="gray cw_text_' + toot.id + '">' + toot.spoiler_text +
|
'</span><span class="gray cw_text_' + toot.id + '">' + toot.spoiler_text +
|
||||||
spoiler_show + '</span>' +
|
spoiler_show + '</span>' +
|
||||||
'' + viewer + '' +
|
'' + viewer + '' +
|
||||||
|
@ -236,11 +249,11 @@ function parseNotf(obj, popup, tlid, acct_id) {
|
||||||
acct_id +
|
acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-share"></i><help>返信</help></a></div>' +
|
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-share"></i><help>返信</help></a></div>' +
|
||||||
'<div><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
'<div><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
',\''+tlid+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
||||||
if_rt + '" id="rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
if_rt + '" id="rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
||||||
'</span><help>ブースト</help></a></div>' +
|
'</span><help>ブースト</help></a></div>' +
|
||||||
'<div><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
'<div><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa text-darken-3 fa-star' +
|
',\''+tlid+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa text-darken-3 fa-star' +
|
||||||
if_fav + '" id="fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
if_fav + '" id="fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
||||||
'<help>お気に入り</help></a></span></div>' +
|
'<help>お気に入り</help></a></span></div>' +
|
||||||
'<div class=' + if_mine + '><a onclick="del(\'' + toot.id + '\',' +
|
'<div class=' + if_mine + '><a onclick="del(\'' + toot.id + '\',' +
|
||||||
|
|
|
@ -94,6 +94,7 @@ function parse(obj, mix, acct_id) {
|
||||||
var mediack = toot.media_attachments[0];
|
var mediack = toot.media_attachments[0];
|
||||||
//メディアがあれば
|
//メディアがあれば
|
||||||
if (mediack) {
|
if (mediack) {
|
||||||
|
var cwdt=100/toot.media_attachments.length
|
||||||
Object.keys(toot.media_attachments).forEach(function(key2) {
|
Object.keys(toot.media_attachments).forEach(function(key2) {
|
||||||
var media = toot.media_attachments[key2];
|
var media = toot.media_attachments[key2];
|
||||||
var purl = media.preview_url;
|
var purl = media.preview_url;
|
||||||
|
@ -103,8 +104,8 @@ function parse(obj, mix, acct_id) {
|
||||||
} else {
|
} else {
|
||||||
var sense = ""
|
var sense = ""
|
||||||
}
|
}
|
||||||
viewer = viewer + '<a onclick="imgv(\''+id+'\',\''+key2+'\')" id="'+id+'-image-'+key2+'" data-url="'+url+'" data-type="'+media.type+'"><img src="' + purl + '" class="' + sense +
|
viewer = viewer + '<a onclick="imgv(\''+id+'\',\''+key2+'\')" id="'+id+'-image-'+key2+'" data-url="'+url+'" data-type="'+media.type+'" class="img-parsed"><img src="' + purl + '" class="' + sense +
|
||||||
' toot-img" style=""></a></span>';
|
' toot-img pointer" style="width:'+cwdt+'%"></a></span>';
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
viewer = "";
|
viewer = "";
|
||||||
|
@ -185,11 +186,11 @@ function parse(obj, mix, acct_id) {
|
||||||
acct_id +
|
acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-share"></i></a></div>' +
|
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-share"></i></a></div>' +
|
||||||
'<div><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
'<div><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
',\''+tlid+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
||||||
if_rt + '" id="rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
if_rt + '" id="rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
||||||
'</span></a></div>' +
|
'</span></a></div>' +
|
||||||
'<div><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
'<div><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa text-darken-3 fa-star' +
|
',\''+tlid+'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa text-darken-3 fa-star' +
|
||||||
if_fav + '" id="fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
if_fav + '" id="fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
||||||
'</a></span></div>' +
|
'</a></span></div>' +
|
||||||
'<div class=' + if_mine + '><a onclick="del(\'' + toot.id + '\',' +
|
'<div class=' + if_mine + '><a onclick="del(\'' + toot.id + '\',' +
|
||||||
|
|
|
@ -3,6 +3,7 @@ function tl(type, data, acct_id, tlid) {
|
||||||
scrollevent();
|
scrollevent();
|
||||||
localStorage.removeItem("morelock");
|
localStorage.removeItem("morelock");
|
||||||
localStorage.removeItem("pool");
|
localStorage.removeItem("pool");
|
||||||
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
//タグの場合はカラム追加して描画
|
//タグの場合はカラム追加して描画
|
||||||
if (tlid == "add") {
|
if (tlid == "add") {
|
||||||
console.log("add");
|
console.log("add");
|
||||||
|
@ -30,6 +31,8 @@ function tl(type, data, acct_id, tlid) {
|
||||||
}
|
}
|
||||||
if (type == "mix") {
|
if (type == "mix") {
|
||||||
//Integratedなら飛ばす
|
//Integratedなら飛ばす
|
||||||
|
$("#notice_" + tlid).text("Integrated TL(" + localStorage.getItem(
|
||||||
|
"user_" + acct_id) + "@" + domain + ")");
|
||||||
mixtl(acct_id, tlid);
|
mixtl(acct_id, tlid);
|
||||||
return;
|
return;
|
||||||
} else if (type == "notf") {
|
} else if (type == "notf") {
|
||||||
|
@ -41,7 +44,6 @@ function tl(type, data, acct_id, tlid) {
|
||||||
}
|
}
|
||||||
localStorage.setItem("now", type);
|
localStorage.setItem("now", type);
|
||||||
todo(cap(type) + " TL Loading...");
|
todo(cap(type) + " TL Loading...");
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
|
||||||
var at = localStorage.getItem(domain + "_at");
|
var at = localStorage.getItem(domain + "_at");
|
||||||
$("#notice_" + tlid).text(cap(type, data) + " TL(" + localStorage.getItem(
|
$("#notice_" + tlid).text(cap(type, data) + " TL(" + localStorage.getItem(
|
||||||
"user_" + acct_id) + "@" + domain + ")");
|
"user_" + acct_id) + "@" + domain + ")");
|
||||||
|
@ -136,14 +138,14 @@ function moreload(type, tlid) {
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
var acct_id = obj[tlid].domain;
|
var acct_id = obj[tlid].domain;
|
||||||
if (!type) {
|
if (!type) {
|
||||||
var type = localStorage.getItem("now");
|
var type = obj[tlid].type;
|
||||||
}
|
}
|
||||||
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
||||||
console.log(localStorage.getItem("morelock") + ":" + sid)
|
console.log(localStorage.getItem("morelock") + ":" + sid)
|
||||||
if (localStorage.getItem("morelock") != sid) {
|
if (localStorage.getItem("morelock") != sid) {
|
||||||
localStorage.setItem("morelock", sid);
|
localStorage.setItem("morelock", sid);
|
||||||
if (type == "mix") {
|
if (type == "mix") {
|
||||||
mixmore();
|
mixmore(tlid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
localStorage.setItem("now", type);
|
localStorage.setItem("now", type);
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var acct = obj[key];
|
var acct = obj[key];
|
||||||
var html = '<div class="box" id="timeline_' + key + '_box" tlid="' + key +
|
var html = '<div class="box" id="timeline_' + key + '_box" tlid="' + key +
|
||||||
'"><div><span id="notice_' + key + '" class="notice"></span>' +
|
'"><div class="notice-box"><span id="notice_' + key + '"></span><br>' +
|
||||||
'<a onclick="notfToggle(' + acct.domain + ',' + key +
|
'<a onclick="notfToggle(' + acct.domain + ',' + key +
|
||||||
')" class="setting nex" title="このアカウントの通知"><i class="material-icons nex notf-icon_' +
|
')" class="setting nex" title="このアカウントの通知"><i class="material-icons nex notf-icon_' +
|
||||||
key + '">notifications</i></a>' +
|
key + '">notifications</i></a>' +
|
||||||
|
@ -62,11 +62,11 @@
|
||||||
')" class="setting nex"><i class="material-icons nex" title="このカラムを削除">remove_circle</i></a>' +
|
')" class="setting nex"><i class="material-icons nex" title="このカラムを削除">remove_circle</i></a>' +
|
||||||
'<a onclick="cardToggle(' + key +
|
'<a onclick="cardToggle(' + key +
|
||||||
')" class="setting nex"><i class="material-icons nex" title="リンクの解析を切り替え(OFFで制限を回避出来る場合があります)">link</i><span id="sta-card-' +
|
')" class="setting nex"><i class="material-icons nex" title="リンクの解析を切り替え(OFFで制限を回避出来る場合があります)">link</i><span id="sta-card-' +
|
||||||
key + '">On</span></a>' +
|
key + '">On</span></a><a onclick="goTop(' + key + ')" class="setting nex"><i class="material-icons nex" title="一番上へ">vertical_align_top</i></a>' +
|
||||||
'<div class="hide notf-indv-box" id="notf-box_' + key +
|
'<div class="hide notf-indv-box" id="notf-box_' + key +
|
||||||
'"><div id="notifications_' + key +
|
'"><div id="notifications_' + key +
|
||||||
'"></div></div></div><div id="timeline_' + key +
|
'"></div></div></div><div class="tl-box"><div id="timeline_' + key +
|
||||||
'" class="tl"></div></div>';
|
'" class="tl"></div></div></div>';
|
||||||
$("#timeline-container").append(html);
|
$("#timeline-container").append(html);
|
||||||
if (acct.data) {
|
if (acct.data) {
|
||||||
var data = acct.data;
|
var data = acct.data;
|
||||||
|
|
|
@ -26,3 +26,7 @@ function scrollck() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function goTop(id){
|
||||||
|
$("#timeline_"+id+"_box").scrollTop(0)
|
||||||
|
}
|
|
@ -27,6 +27,12 @@ function udg(user, acct_id) {
|
||||||
} else {
|
} else {
|
||||||
$('#his-data').attr("user-id", user);
|
$('#his-data').attr("user-id", user);
|
||||||
$('#his-data').attr("use-acct", acct_id);
|
$('#his-data').attr("use-acct", acct_id);
|
||||||
|
if(json.username!=json.acct){
|
||||||
|
//Remote
|
||||||
|
$('#his-data').attr("remote", "true");
|
||||||
|
}else{
|
||||||
|
$('#his-data').attr("remote", "false");
|
||||||
|
}
|
||||||
$("#his-name").text(json.display_name);
|
$("#his-name").text(json.display_name);
|
||||||
$("#his-acct").text(json.acct);
|
$("#his-acct").text(json.acct);
|
||||||
$("#his-prof").attr("src", json.avatar);
|
$("#his-prof").attr("src", json.avatar);
|
||||||
|
@ -89,6 +95,8 @@ function relations(user, acct_id) {
|
||||||
//自分がフォローしている
|
//自分がフォローしている
|
||||||
$("#his-data").addClass("following");
|
$("#his-data").addClass("following");
|
||||||
$("#his-follow-btn").text("フォロー解除");
|
$("#his-follow-btn").text("フォロー解除");
|
||||||
|
}else{
|
||||||
|
$("#his-follow-btn").text("フォロー");
|
||||||
}
|
}
|
||||||
if (json.followed_by) {
|
if (json.followed_by) {
|
||||||
//フォローされてる
|
//フォローされてる
|
||||||
|
@ -97,18 +105,26 @@ function relations(user, acct_id) {
|
||||||
if (json.blocking) {
|
if (json.blocking) {
|
||||||
$("#his-data").addClass("blocking");
|
$("#his-data").addClass("blocking");
|
||||||
$("#his-block-btn").text("ブロック解除");
|
$("#his-block-btn").text("ブロック解除");
|
||||||
|
}else{
|
||||||
|
$("#his-block-btn").text("ブロック");
|
||||||
}
|
}
|
||||||
if (json.muting) {
|
if (json.muting) {
|
||||||
$("#his-data").addClass("muting");
|
$("#his-data").addClass("muting");
|
||||||
$("#his-mute-btn").text("ミュート解除");
|
$("#his-mute-btn").text("ミュート解除");
|
||||||
|
}else{
|
||||||
|
$("#his-mute-btn").text("ミュート");
|
||||||
}
|
}
|
||||||
if (json.muting_notifications) {
|
if (json.muting_notifications) {
|
||||||
$("#his-data").addClass("mutingNotf");
|
$("#his-data").addClass("mutingNotf");
|
||||||
$("#his-notf-btn").text("通知ミュート解除");
|
$("#his-notf-btn").text("通知ミュート解除");
|
||||||
|
}else{
|
||||||
|
$("#his-notf-btn").text("通知ミュート");
|
||||||
}
|
}
|
||||||
if (json.domain_blocking) {
|
if (json.domain_blocking) {
|
||||||
$("#his-data").addClass("blockingDom");
|
$("#his-data").addClass("blockingDom");
|
||||||
$("#his-domain-btn").text("ドメインブロック解除");
|
$("#his-domain-btn").text("ドメインブロック解除");
|
||||||
|
}else{
|
||||||
|
$("#his-domain-btn").text("ドメインブロック");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "TheDesk",
|
"name": "TheDesk",
|
||||||
"version": "11.4.1",
|
"version": "11.5.0",
|
||||||
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
|
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user