TheDesk Riina (ver.7)
This commit is contained in:
parent
af42745aa7
commit
ba95bd9a24
14
LATEST.md
14
LATEST.md
|
@ -1,19 +1,15 @@
|
||||||
## For Markdown-supporting Instances
|
## For Markdown-supporting Instances
|
||||||
|
|
||||||
[TheDesk](https://thedesk.top) :thedesk: Riina (ver.6)
|
[TheDesk](https://thedesk.top) :thedesk: Riina (ver.7)
|
||||||
・バグ修正
|
・バグ修正
|
||||||
トゥートを削除できないバグ
|
トゥート自動折りたたみ機能他
|
||||||
Integrated TLの順番がおかしいバグ
|
・デザイン微修正
|
||||||
スクロールしても読み込まれないバグ
|
|
||||||
URLコピー等が効かないバグ
|
|
||||||
:github: [cutls/TheDesk](https://github.com/cutls/TheDesk) #Desk #DeskUpdate
|
:github: [cutls/TheDesk](https://github.com/cutls/TheDesk) #Desk #DeskUpdate
|
||||||
|
|
||||||
## For Vanilla Instances
|
## For Vanilla Instances
|
||||||
|
|
||||||
WindowsクライアントTheDesk Riina (ver.6)リリース
|
WindowsクライアントTheDesk Riina (ver.6)リリース
|
||||||
・バグ修正
|
・バグ修正
|
||||||
トゥートを削除できないバグ
|
トゥート自動折りたたみ機能他
|
||||||
Integrated TLの順番がおかしいバグ
|
・デザイン微修正
|
||||||
スクロールしても読み込まれないバグ
|
|
||||||
URLコピー等が効かないバグ
|
|
||||||
https://thedesk.top
|
https://thedesk.top
|
|
@ -179,22 +179,27 @@ p {
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-a1 {
|
.area-a1 {
|
||||||
|
text-align: center;
|
||||||
grid-area: a1;
|
grid-area: a1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-a2 {
|
.area-a2 {
|
||||||
|
text-align: center;
|
||||||
grid-area: a2;
|
grid-area: a2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-a3 {
|
.area-a3 {
|
||||||
|
text-align: center;
|
||||||
grid-area: a3;
|
grid-area: a3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-a4 {
|
.area-a4 {
|
||||||
|
text-align: center;
|
||||||
grid-area: a4;
|
grid-area: a4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-a5 {
|
.area-a5 {
|
||||||
|
text-align: center;
|
||||||
grid-area: a5;
|
grid-area: a5;
|
||||||
}
|
}
|
||||||
.tl-title {
|
.tl-title {
|
||||||
|
|
|
@ -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="Riina (ver.6[fixed])";
|
var ver="Riina (ver.7)";
|
||||||
//betaを入れるとバージョンチェックしない
|
//betaを入れるとバージョンチェックしない
|
||||||
//var ver="beta";
|
//var ver="beta";
|
||||||
var acct_id=0;
|
var acct_id=0;
|
||||||
|
@ -105,25 +105,25 @@ var tlid=0;
|
||||||
<div id="post-box" class="z-depth-3">
|
<div id="post-box" class="z-depth-3">
|
||||||
<!--トゥートボックス-->
|
<!--トゥートボックス-->
|
||||||
<span class="cancel">
|
<span class="cancel">
|
||||||
<i class="material-icons" onclick="hide()" title="このボックスを閉じる(X)">cancel</i>
|
<i class="material-icons waves-effect" onclick="hide()" title="このボックスを閉じる(X)">cancel</i>
|
||||||
<i class="material-icons mini-btn" onclick="mini()" title="このボックスを最小化">expand_more</i>
|
<i class="material-icons waves-effect mini-btn" onclick="mini()" title="このボックスを最小化">expand_more</i>
|
||||||
</span><br>
|
</span><br>
|
||||||
<a onclick="addToggle()" class="setting nex"><i class="material-icons nex mize" title="カラム追加">add</i></a>
|
<a onclick="addToggle()" class="setting nex waves-effect"><i class="material-icons nex mize" title="カラム追加">add</i></a>
|
||||||
<a id="clear" class="setting nex"><i class="material-icons nex mize" title="トゥートボックスのクリア">clear</i></a>
|
<a id="clear" class="setting nex waves-effect"><i class="material-icons nex mize" title="トゥートボックスのクリア">clear</i></a>
|
||||||
<a onclick="zoomBox()" class="setting nex"><i class="material-icons nex mize" title="ボックスの拡大・縮小(E)">zoom_out_map</i></a>
|
<a onclick="zoomBox()" class="setting nex waves-effect"><i class="material-icons nex mize" title="ボックスの拡大・縮小(E)">zoom_out_map</i></a>
|
||||||
<a onclick="srcToggle()" class="setting nex"><i class="material-icons nex mize" title="検索">search</i></a>
|
<a onclick="srcToggle()" class="setting nex waves-effect"><i class="material-icons nex mize" title="検索">search</i></a>
|
||||||
<a href="setting.html" class="setting nex"><i class="material-icons nex mize" title="設定">settings</i></a>
|
<a href="setting.html" class="setting nex waves-effect"><i class="material-icons nex mize" title="設定">settings</i></a>
|
||||||
<a onclick="profShow()"><i class="material-icons nex pointer mize" title="選択中のプロフィール表示">account_circle</i></a>
|
<a onclick="profShow()"><i class="material-icons nex pointer mize waves-effect" title="選択中のプロフィール表示">account_circle</i></a>
|
||||||
<a href="index.html" class="setting nex mize"><i class="material-icons nex" title="スーパーリロード">refresh</i></a>
|
<a href="index.html" class="setting nex mize waves-effect"><i class="material-icons nex" title="スーパーリロード">refresh</i></a>
|
||||||
<a onclick="window.open('https://astarte.thedesk.top');" class="setting nex mize" target="_blank" id="ranking-btn" style="display:none;"><i class="material-icons nex" title="アスタルテランキング">timeline</i></a>
|
<a onclick="window.open('https://astarte.thedesk.top');" class="setting nex mize waves-effect" target="_blank" id="ranking-btn" style="display:none;"><i class="material-icons nex" title="アスタルテランキング">timeline</i></a>
|
||||||
<a onclick="Rtoggle()" class="setting nex mize" id="radio-btn"><i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i></a><span id="radio-sta" class="radio"></span>
|
<a onclick="Rtoggle()" class="setting nex mize waves-effect" id="radio-btn"><i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i></a><span id="radio-sta" class="radio"></span>
|
||||||
<div id="radio-view" class="hide radio mize">
|
<div id="radio-view" class="hide radio mize">
|
||||||
<span class="cbadge pointer" onclick="Rplay('https://listen.moe/stream','Listen.moe')" data-name="Listen.moe">Listen.moe</span>
|
<span class="cbadge pointer waves-effect" onclick="Rplay('https://listen.moe/stream','Listen.moe')" data-name="Listen.moe">Listen.moe</span>
|
||||||
<span class="cbadge pointer" onclick="Rplay('http://itori.animenfo.com:443','AnimeNfo Radio')" data-name="AnimeNfo Radio">AnimeNfo Radio</span>
|
<span class="cbadge pointer waves-effect" onclick="Rplay('http://itori.animenfo.com:443','AnimeNfo Radio')" data-name="AnimeNfo Radio">AnimeNfo Radio</span>
|
||||||
<span class="cbadge pointer" onclick="Rplay('http://hyades.shoutca.st:8043/stream','LoFi hip hop Radio')" data-name="LoFi hip hop Radio">LoFi hip hop Radio</span>
|
<span class="cbadge pointer waves-effect" onclick="Rplay('http://hyades.shoutca.st:8043/stream','LoFi hip hop Radio')" data-name="LoFi hip hop Radio">LoFi hip hop Radio</span>
|
||||||
<span class="cbadge pointer" onclick="Rplay('http://89.16.185.174:8004/stream','Linn Classical')" data-name="Linn Classical">Linn Classical</span>
|
<span class="cbadge pointer waves-effect" onclick="Rplay('http://89.16.185.174:8004/stream','Linn Classical')" data-name="Linn Classical">Linn Classical</span>
|
||||||
<span class="cbadge pointer" onclick="Rplay('http://edge-ads-01-cr.sharp-stream.com/jazzfmmobile.aac','Jazz FM')" data-name="Jazz FM">Jazz FM</span>
|
<span class="cbadge pointer waves-effect" onclick="Rplay('http://edge-ads-01-cr.sharp-stream.com/jazzfmmobile.aac','Jazz FM')" data-name="Jazz FM">Jazz FM</span>
|
||||||
<span class="cbadge pointer" onclick="Ryourself()">Others</span>
|
<span class="cbadge pointer waves-effect" onclick="Ryourself()">Others</span>
|
||||||
</div>
|
</div>
|
||||||
<div id="radio-input" class="hide radio mize">
|
<div id="radio-input" class="hide radio mize">
|
||||||
<input type="url" id="radio-url" placeholder="URL" style="width:100px">
|
<input type="url" id="radio-url" placeholder="URL" style="width:100px">
|
||||||
|
@ -141,26 +141,26 @@ var tlid=0;
|
||||||
<div class="row" style="margin-bottom:0">
|
<div class="row" style="margin-bottom:0">
|
||||||
<div class="markdown mize">
|
<div class="markdown mize">
|
||||||
<div class="col s12 more-show">
|
<div class="col s12 more-show">
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('b')" title="太字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('b')" title="太字(Ctrl+B)テキストボックス内を選択してから押すと囲みます。">format_bold</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('i')" title="斜字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('i')" title="斜字(Ctrl+I)テキストボックス内を選択してから押すと囲みます。">format_italic</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('u')" title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('u')" title="下線(Ctrl+U)テキストボックス内を選択してから押すと囲みます。">format_underlined</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('s')" title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('s')" title="取り消し(Ctrl+S)テキストボックス内を選択してから押すと囲みます。">strikethrough_s</i>
|
||||||
<i class="material-icons pointer setting" onclick="markdown('>','no','yes')" title="引用">format_quote</i>
|
<i class="material-icons pointer setting waves-effect" onclick="markdown('>','no','yes')" title="引用">format_quote</i>
|
||||||
<i class="material-icons pointer setting" onclick="markdown('#','no','yes')" title="見出し">short_text</i>
|
<i class="material-icons pointer setting waves-effect" onclick="markdown('#','no','yes')" title="見出し">short_text</i>
|
||||||
<i class="material-icons pointer setting" onclick="markdown('`','yes','no')" title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
|
<i class="material-icons pointer setting waves-effect" onclick="markdown('`','yes','no')" title="コード挿入 テキストボックス内を選択してから押すと囲みます。">code</i>
|
||||||
<i class="material-icons pointer setting" onclick="markdown('- ','yes','yes')" title="箇条書きリスト">format_list_bulleted</i>
|
<i class="material-icons pointer setting waves-effect" onclick="markdown('- ','yes','yes')" title="箇条書きリスト">format_list_bulleted</i>
|
||||||
<i class="material-icons pointer setting" onclick="markdown('1. ','yes','yes')" title="番号付きリスト">format_list_numbered</i>
|
<i class="material-icons pointer setting waves-effect" onclick="markdown('1. ','yes','yes')" title="番号付きリスト">format_list_numbered</i>
|
||||||
<i class="pointer setting fa fa-subscript" onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
|
<i class="pointer setting fa fa-subscript waves-effect" onclick="markdown('__','yes','no','before')" title="下付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
|
||||||
<i class="pointer setting fa fa-superscript" onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
|
<i class="pointer setting fa fa-superscript waves-effect" onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:1.5rem"></i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('spin')" title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('spin')" title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('pulse')" title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('pulse')" title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('flip=vertical')" title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=vertical')" title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('flip=horizontal')" title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('flip=horizontal')" title="左右反転 テキストボックス内を選択してから押すと囲みます。">swap_horiz</i>
|
||||||
<span class="sml gray pointer"><a onclick="mdToggle()">Markdownエディタを隠す</a></span><br>
|
<span class="sml gray pointer waves-effect"><a onclick="mdToggle()">Markdownエディタを隠す</a></span><br>
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('size')" title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i><input id="size" style="width: calc(50% - 20px); margin: 0; height: 24px;" value="12">px
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('size')" title="文字サイズ変更 テキストボックス内を選択してから押すと囲みます。">format_size</i><input id="size" style="width: calc(50% - 20px); margin: 0; height: 24px;" value="12">px
|
||||||
<i class="material-icons pointer setting" onclick="tagsel('colorhex')" title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i><input id="colorhex" style="width: calc(50% - 50px); margin: 0; height: 24px;" type="color"><br>
|
<i class="material-icons pointer setting waves-effect" onclick="tagsel('colorhex')" title="文字色変更 テキストボックス内を選択してから押すと囲みます。">color_lens</i><input id="colorhex" style="width: calc(50% - 50px); margin: 0; height: 24px;" type="color"><br>
|
||||||
<i class="material-icons pointer setting" onclick="markdownLink()" title="リンク挿入">link</i><input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクテキスト"> <input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクアドレス"><br>
|
<i class="material-icons pointer setting waves-effect" onclick="markdownLink()" title="リンク挿入">link</i><input id="linkt" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクテキスト"> <input id="link2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="リンクアドレス"><br>
|
||||||
<i class="material-icons pointer setting" onclick="markdownImage()" title="インライン画像挿入">image</i><input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="代替テキスト"> <input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="画像アドレス">
|
<i class="material-icons pointer setting waves-effect" onclick="markdownImage()" title="インライン画像挿入">image</i><input id="image" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="代替テキスト"> <input id="image2" style="width: calc(50% - 20px); margin: 0; height: 24px;" placeholder="画像アドレス">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-field col s12" id="preview-field" style="margin-top: 0;">
|
<div class="input-field col s12" id="preview-field" style="margin-top: 0;">
|
||||||
|
@ -229,7 +229,7 @@ var tlid=0;
|
||||||
</div>
|
</div>
|
||||||
<!--最小化-->
|
<!--最小化-->
|
||||||
<div class="fixed-action-btn horizontal" id="menu-btn" onclick="show()">
|
<div class="fixed-action-btn horizontal" id="menu-btn" onclick="show()">
|
||||||
<a class="btn-floating btn-large red">
|
<a class="btn-floating btn-large red waves-effect">
|
||||||
<i class="large material-icons">mode_edit</i>
|
<i class="large material-icons">mode_edit</i>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -237,7 +237,7 @@ var tlid=0;
|
||||||
<!-- Modal Structure Tootdata-->
|
<!-- Modal Structure Tootdata-->
|
||||||
<div id="tootmodal" class="modal modal-fixed-footer">
|
<div id="tootmodal" class="modal modal-fixed-footer">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<ul class="collapsible" data-collapsible="accordion">
|
<ul class="collapsible" data-collapsible="accordion" id="det-col">
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header"><i class="material-icons">arrow_upward</i>これよりあとのコンテクスト</div>
|
<div class="collapsible-header"><i class="material-icons">arrow_upward</i>これよりあとのコンテクスト</div>
|
||||||
<div class="collapsible-body toot-reset" id="toot-after"></div>
|
<div class="collapsible-body toot-reset" id="toot-after"></div>
|
||||||
|
@ -247,7 +247,7 @@ var tlid=0;
|
||||||
<div class="collapsible-body toot-reset" id="toot-reply"></div>
|
<div class="collapsible-body toot-reset" id="toot-reply"></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<div class="collapsible-header active"><i class="material-icons">more_horiz</i>対象のトゥート</div>
|
<div class="collapsible-header" id="activator"><i class="material-icons">more_horiz</i>対象のトゥート</div>
|
||||||
<div class="collapsible-body toot-reset" id="toot-this"></div>
|
<div class="collapsible-body toot-reset" id="toot-this"></div>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
if(url){
|
if(url){
|
||||||
urls = url.match(/https?:\/\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/);
|
urls = url.match(/https?:\/\/([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/);
|
||||||
//hrefがhttp/httpsならブラウザで
|
//hrefがhttp/httpsならブラウザで
|
||||||
|
if(urls){
|
||||||
if (urls[0]) {
|
if (urls[0]) {
|
||||||
const {
|
const {
|
||||||
shell
|
shell
|
||||||
|
@ -21,6 +22,7 @@
|
||||||
location.href = url;
|
location.href = url;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,10 @@ function details(id, acct_id) {
|
||||||
context(id, acct_id);
|
context(id, acct_id);
|
||||||
faved(id, acct_id);
|
faved(id, acct_id);
|
||||||
rted(id, acct_id);
|
rted(id, acct_id);
|
||||||
|
if(!$("#activator").hasClass("active")){
|
||||||
|
$('#det-col').collapsible('open', 2);
|
||||||
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ function mixtl(acct_id, tlid) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
//パースして描画
|
//パースして描画
|
||||||
var templete = parse(json, 'mix', acct_id);
|
var templete = parse(json, 'mix', acct_id, tlid);
|
||||||
$("#timeline_" + tlid).html(templete[0]);
|
$("#timeline_" + tlid).html(templete[0]);
|
||||||
|
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
|
@ -55,14 +55,14 @@ function mixtl(acct_id, tlid) {
|
||||||
if (!$("#timeline_" + tlid + " [toot-id=" + obj[0].id + "]").length &&
|
if (!$("#timeline_" + tlid + " [toot-id=" + obj[0].id + "]").length &&
|
||||||
key2 < date(obj[0].created_at, 'unix')) {
|
key2 < date(obj[0].created_at, 'unix')) {
|
||||||
$("#timeline_" + tlid + " .cvo").first().before(parse([obj[0]],
|
$("#timeline_" + tlid + " .cvo").first().before(parse([obj[0]],
|
||||||
'home', acct_id)+'<div class="divider"></div>');
|
'home', acct_id, tlid)+'<div class="divider"></div>');
|
||||||
}
|
}
|
||||||
if (!$("#timeline_" + tlid + " [toot-id=" + toot.id + "]").length) {
|
if (!$("#timeline_" + tlid + " [toot-id=" + toot.id + "]").length) {
|
||||||
if (key2 > tarunix) {
|
if (key2 > tarunix) {
|
||||||
var local = locals[key2];
|
var local = locals[key2];
|
||||||
console.log("#timeline_" + tlid + " [toot-id=" + local + "]");
|
console.log("#timeline_" + tlid + " [toot-id=" + local + "]");
|
||||||
$("#timeline_" + tlid + " [toot-id=" + local + "]").after('<div class="divider"></div>'+parse(
|
$("#timeline_" + tlid + " [toot-id=" + local + "]").after('<div class="divider"></div>'+parse(
|
||||||
[toot], 'home', acct_id));
|
[toot], 'home', acct_id, tlid));
|
||||||
tarunix = 0;
|
tarunix = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,7 +108,7 @@ function mixre(acct_id, tlid) {
|
||||||
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
|
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
|
||||||
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
||||||
} else if (type == "update") {
|
} else if (type == "update") {
|
||||||
var templete = parse([obj], '', acct_id);
|
var templete = parse([obj], '', acct_id, tlid);
|
||||||
var pool = localStorage.getItem("pool_" + tlid);
|
var pool = localStorage.getItem("pool_" + tlid);
|
||||||
if (pool) {
|
if (pool) {
|
||||||
pool = templete + pool;
|
pool = templete + pool;
|
||||||
|
@ -132,7 +132,7 @@ function mixre(acct_id, tlid) {
|
||||||
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
|
$("[toot-id=" + JSON.parse(mess.data).payload + "]").hide();
|
||||||
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
||||||
} else if (type == "update") {
|
} else if (type == "update") {
|
||||||
var templete = parse([obj], '', acct_id);
|
var templete = parse([obj], '', acct_id, tlid);
|
||||||
if (obj.visibility != "public" || obj.account.acct != obj.account.username) {
|
if (obj.visibility != "public" || obj.account.acct != obj.account.username) {
|
||||||
var pool = localStorage.getItem("pool_" + tlid);
|
var pool = localStorage.getItem("pool_" + tlid);
|
||||||
if (pool) {
|
if (pool) {
|
||||||
|
@ -179,7 +179,7 @@ function mixmore(tlid) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
var templete = parse(json, 'mix', acct_id);
|
var templete = parse(json, 'mix', acct_id, tlid);
|
||||||
$("#timeline_" + tlid).append(templete[0]);
|
$("#timeline_" + tlid).append(templete[0]);
|
||||||
var locals = templete[1];
|
var locals = templete[1];
|
||||||
todo("Integrated TL MoreLoading...(Home)");
|
todo("Integrated TL MoreLoading...(Home)");
|
||||||
|
@ -213,7 +213,7 @@ function mixmore(tlid) {
|
||||||
if (key2 > tarunix) {
|
if (key2 > tarunix) {
|
||||||
var local = locals[key2];
|
var local = locals[key2];
|
||||||
$("[toot-id=" + local + "]").after(parse([toot], 'home',
|
$("[toot-id=" + local + "]").after(parse([toot], 'home',
|
||||||
acct_id));
|
acct_id, tlid));
|
||||||
tarunix = 0;
|
tarunix = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,11 @@ function notf(acct_id, tlid, sys) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
var templete = parseNotf(json, -1, tlid, acct_id);
|
var templete = parse(json, '', acct_id, tlid, -1)
|
||||||
if (sys == "direct") {
|
if (sys == "direct") {
|
||||||
$("#timeline_" + tlid).html(templete[0]);
|
$("#timeline_" + tlid).html(templete);
|
||||||
} else {
|
} else {
|
||||||
$("#notifications_" + tlid).html(templete[0]);
|
$("#notifications_" + tlid).html(templete);
|
||||||
}
|
}
|
||||||
|
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
|
@ -51,7 +51,7 @@ function notf(acct_id, tlid, sys) {
|
||||||
if (!popup) {
|
if (!popup) {
|
||||||
popup = 0;
|
popup = 0;
|
||||||
}
|
}
|
||||||
var templete = parseNotf([obj], popup, tlid, acct_id);
|
var templete = parse(json, '', acct_id, tlid, popup)
|
||||||
var notices = templete[1];
|
var notices = templete[1];
|
||||||
console.log(templete);
|
console.log(templete);
|
||||||
if (sys == "direct") {
|
if (sys == "direct") {
|
||||||
|
@ -80,303 +80,3 @@ function notfToggle(acct, tlid) {
|
||||||
}
|
}
|
||||||
$(".notf-icon_" + tlid).removeClass("red-text");
|
$(".notf-icon_" + tlid).removeClass("red-text");
|
||||||
}
|
}
|
||||||
|
|
||||||
//通知オブジェクトパーサー
|
|
||||||
function parseNotf(obj, popup, tlid, acct_id) {
|
|
||||||
var templete = '';
|
|
||||||
var datetype = localStorage.getItem("datetype");
|
|
||||||
var nsfwtype = localStorage.getItem("nsfw");
|
|
||||||
var gif = localStorage.getItem("gif");
|
|
||||||
if (!gif) {
|
|
||||||
var gif = "yes";
|
|
||||||
}
|
|
||||||
if (!nsfwtype || nsfwtype == "yes") {
|
|
||||||
var nsfw = "ok";
|
|
||||||
} else {
|
|
||||||
var nsfw;
|
|
||||||
}
|
|
||||||
var cwtype = localStorage.getItem("cw");
|
|
||||||
if (!cwtype || cwtype == "yes") {
|
|
||||||
var cw = "ok";
|
|
||||||
} else {
|
|
||||||
var cw;
|
|
||||||
}
|
|
||||||
if (!datetype) {
|
|
||||||
datetype = "absolute";
|
|
||||||
}
|
|
||||||
Object.keys(obj).forEach(function(key) {
|
|
||||||
var eachobj = obj[key];
|
|
||||||
var toot = eachobj.status;
|
|
||||||
//トゥートである
|
|
||||||
var type = eachobj.type;
|
|
||||||
if (toot) {
|
|
||||||
if (!toot.application) {
|
|
||||||
var via = '<span style="font-style: italic;">Unknown</span>';
|
|
||||||
} else {
|
|
||||||
var via = toot.application.name;
|
|
||||||
}
|
|
||||||
var sent = localStorage.getItem("sentence");
|
|
||||||
if (!sent) {
|
|
||||||
var sent = 500;
|
|
||||||
}
|
|
||||||
if (toot.spoiler_text && cw) {
|
|
||||||
var content = toot.content;
|
|
||||||
var spoil = toot.spoiler_text;
|
|
||||||
var spoiler = "cw cw_hide_" + toot.id;
|
|
||||||
var api_spoil = "gray";
|
|
||||||
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
|
|
||||||
'\')" class="nex parsed">見る</a>';
|
|
||||||
} else {
|
|
||||||
var ct = toot.content.split('</p>').length + toot.content.split('<br />')
|
|
||||||
.length -
|
|
||||||
2;
|
|
||||||
if (sent < ct && $.mb_strlen(toot.content) > 5) {
|
|
||||||
var content = '<span class="gray">以下全文</span><br>' + toot.content
|
|
||||||
var spoil = '<span class="cw-long-' + toot.id + '">' + $.strip_tags($.mb_substr(
|
|
||||||
toot.content, 0, 100)) +
|
|
||||||
'</span><span class="gray">自動折りたたみ</span>';
|
|
||||||
var spoiler = "cw cw_hide_" + toot.id;
|
|
||||||
var spoiler_show = '<a href="#" onclick="cw_show(\'' + toot.id +
|
|
||||||
'\')" class="nex parsed">続き…</a>';
|
|
||||||
} else {
|
|
||||||
var content = toot.content;
|
|
||||||
var spoil = toot.spoiler_text;
|
|
||||||
var spoiler = "";
|
|
||||||
var spoiler_show = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (toot.account.locked) {
|
|
||||||
var locked = ' <i class="fa fa-lock red-text"></i>';
|
|
||||||
} else {
|
|
||||||
var locked = "";
|
|
||||||
}
|
|
||||||
var id = toot.id;
|
|
||||||
if (eachobj.type == "mention") {
|
|
||||||
var what = "返信しました";
|
|
||||||
} else if (eachobj.type == "reblog") {
|
|
||||||
var what = "ブーストしました";
|
|
||||||
} else if (eachobj.type == "favourite") {
|
|
||||||
var what = "お気に入り登録しました";
|
|
||||||
}
|
|
||||||
var noticetext = '<a onclick="udg(\'' + eachobj.account.id +
|
|
||||||
'\',\'' + acct_id + '\')" class="pointer">' + eachobj.account.display_name +
|
|
||||||
"(" + eachobj.account.acct +
|
|
||||||
")</a>が" + what;
|
|
||||||
var memory = localStorage.getItem("notice-mem");
|
|
||||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
|
||||||
Materialize.toast(noticetext, popup * 1000);
|
|
||||||
$(".notf-icon_" + tlid).addClass("red-text");
|
|
||||||
localStorage.setItem("notice-mem", noticetext);
|
|
||||||
notftext = "";
|
|
||||||
}
|
|
||||||
if (toot.spoiler_text && cw) {
|
|
||||||
var spoiler = "cw cw_hide_" + toot.id;
|
|
||||||
var spoiler_show = '<a onclick="cw_show(\'' + toot.id + '\')">見る</a>';
|
|
||||||
} else {
|
|
||||||
var spoiler = "";
|
|
||||||
var spoiler_show = "";
|
|
||||||
}
|
|
||||||
var urls = content.match(
|
|
||||||
/https?:\/\/([-a-zA-Z0-9@.]+)\/?([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)?/
|
|
||||||
);
|
|
||||||
if (urls) {
|
|
||||||
var analyze = '<a onclick="additionalIndv(\'' + tlid + '\',' + acct_id +
|
|
||||||
',\'' + id + '\')" class="add-show pointer">URL解析</a>';
|
|
||||||
} else {
|
|
||||||
var analyze = '';
|
|
||||||
}
|
|
||||||
var viewer = "";
|
|
||||||
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:1em" class="emoji-img">';
|
|
||||||
var regExp = new RegExp(":" + shortcode + ":", "g");
|
|
||||||
content = content.replace(regExp, emoji_url);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var mediack = toot.media_attachments[0];
|
|
||||||
//メディアがあれば
|
|
||||||
if (mediack) {
|
|
||||||
var cwdt = 100 / toot.media_attachments.length
|
|
||||||
Object.keys(toot.media_attachments).forEach(function(key2) {
|
|
||||||
var media = toot.media_attachments[key2];
|
|
||||||
var purl = media.preview_url;
|
|
||||||
var url = media.url;
|
|
||||||
if (toot.sensitive && nsfw) {
|
|
||||||
var sense = "sensitive"
|
|
||||||
} else {
|
|
||||||
var sense = ""
|
|
||||||
}
|
|
||||||
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
|
|
||||||
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
|
|
||||||
'" data-type="' + media.type + '" class="img-parsed"><img src="' +
|
|
||||||
purl + '" class="' + sense +
|
|
||||||
' toot-img pointer" style="width:' + cwdt + '%"></a></span>';
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
viewer = "";
|
|
||||||
}
|
|
||||||
//公開範囲を取得
|
|
||||||
var vis = "";
|
|
||||||
var visen = toot.visibility;
|
|
||||||
if (visen == "public") {
|
|
||||||
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" title="未収載">lock_open</i>';
|
|
||||||
} else if (visen == "plivate") {
|
|
||||||
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" title="ダイレクト">mail</i>';
|
|
||||||
}
|
|
||||||
var menck = toot.mentions[0];
|
|
||||||
var mentions = "";
|
|
||||||
if (menck) {
|
|
||||||
mentions = "Links: ";
|
|
||||||
Object.keys(toot.mentions).forEach(function(key3) {
|
|
||||||
var mention = toot.mentions[key3];
|
|
||||||
mentions = mentions + '<a onclick="udg(\'' + mention.id +
|
|
||||||
'\')" class="pointer">@' + mention.acct + '</a> ';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var tagck = toot.tags[0];
|
|
||||||
var tags = "";
|
|
||||||
if (tagck) {
|
|
||||||
if (!menck) {
|
|
||||||
tags = "Links: ";
|
|
||||||
}
|
|
||||||
Object.keys(toot.tags).forEach(function(key4) {
|
|
||||||
var tag = toot.tags[key4];
|
|
||||||
tags = tags + '<a onclick="tl(\'tag\',\'' + tag.name +
|
|
||||||
'\')" class="pointer">#' + tag.name + '</a> ';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (toot.favourited) {
|
|
||||||
var if_fav = " yellow-text";
|
|
||||||
var fav_app = "faved";
|
|
||||||
} else {
|
|
||||||
var if_fav = "";
|
|
||||||
var fav_app = "";
|
|
||||||
}
|
|
||||||
if (toot.reblogged) {
|
|
||||||
var if_rt = "teal-text";
|
|
||||||
var rt_app = "rted";
|
|
||||||
} else {
|
|
||||||
var if_rt = "";
|
|
||||||
var rt_app = "";
|
|
||||||
}
|
|
||||||
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
|
|
||||||
var if_mine = "";
|
|
||||||
} else {
|
|
||||||
var if_mine = "hide";
|
|
||||||
}
|
|
||||||
if (toot.favourited) {
|
|
||||||
var if_fav = " yellow-text";
|
|
||||||
var fav_app = "faved";
|
|
||||||
} else {
|
|
||||||
var if_fav = "";
|
|
||||||
var fav_app = "";
|
|
||||||
}
|
|
||||||
if (toot.reblogged) {
|
|
||||||
var if_rt = "teal-text";
|
|
||||||
var rt_app = "rted";
|
|
||||||
} else {
|
|
||||||
var if_rt = "";
|
|
||||||
var rt_app = "";
|
|
||||||
}
|
|
||||||
var boostback = "";
|
|
||||||
var hasmedia = "";
|
|
||||||
var home = "";
|
|
||||||
//アニメ再生
|
|
||||||
if (gif == "yes") {
|
|
||||||
var avatar = toot.account.avatar;
|
|
||||||
} else {
|
|
||||||
var avatar = toot.account.avatar_static;
|
|
||||||
}
|
|
||||||
var divider = '<div class="divider"></div>';
|
|
||||||
var notice = noticetext;
|
|
||||||
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
|
||||||
boostback + ' ' + fav_app + ' ' + rt_app +
|
|
||||||
' ' + hasmedia + '" toot-id="' + id + '" unixtime="' + date(obj[
|
|
||||||
key].created_at, 'unix') + '">' +
|
|
||||||
'<div class="area-notice"><span class="gray sharesta"><span class="cbadge"title="' + date(eachobj.created_at,
|
|
||||||
'absolute') + '(通知された時間)"><i class="fa fa-clock-o"></i>' + date(eachobj.created_at,
|
|
||||||
datetype) +
|
|
||||||
'</span>' + notice + home +
|
|
||||||
'</span></div>' +
|
|
||||||
'<div class="area-icon"><a onclick="udg(\'' + toot.account.id +
|
|
||||||
'\',' + acct_id + ');" user="' + toot.account.acct + '" class="udg">' +
|
|
||||||
'<img src="' + avatar +
|
|
||||||
'" width="40" class="prof-img" user="' + toot.account.acct +
|
|
||||||
'"></a></div>' +
|
|
||||||
'<div class="area-display_name"><span class="user">' +
|
|
||||||
toot.account.display_name +
|
|
||||||
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;cursor:text;"> @' +
|
|
||||||
toot.account.acct + locked + '</span></div>' +
|
|
||||||
'<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' + toot.url +
|
|
||||||
'\');" title="' + date(toot.created_at, 'absolute') +
|
|
||||||
'(クリックでトゥートURLをコピー)"><i class="fa fa-clock-o"></i>' +
|
|
||||||
date(toot.created_at, datetype) + '</span></div></div>' +
|
|
||||||
'<div class="area-toot"><span class="toot ' + spoiler + '">' + content +
|
|
||||||
'</span><span class="' +
|
|
||||||
api_spoil + ' cw_text_' + toot.id + '">' + spoil + spoiler_show +
|
|
||||||
'</span>' +
|
|
||||||
'' + viewer + '' +
|
|
||||||
'</div><div class="area-additional"><span class="additional">' + analyze +
|
|
||||||
'</span>' +
|
|
||||||
'' + mentions + tags + '</div>' +
|
|
||||||
'<div class="area-actions" style="padding:0; margin:0; top:-20px; display:flex; justify-content:space-around; max-width:100%; ">' +
|
|
||||||
'<div class="action"><span class="waves-effect waves-dark btn-flat" style="padding:0">' +
|
|
||||||
vis + '</span></div><div class="action"><a onclick="re(\'' + toot.id +
|
|
||||||
'\',\'' + toot.account.acct + '\',' +
|
|
||||||
acct_id +
|
|
||||||
')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa fa-share"></i></a></div>' +
|
|
||||||
'<div class="action"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
|
||||||
',\'' + tlid +
|
|
||||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
|
||||||
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
|
||||||
'</span></a></div>' +
|
|
||||||
'<div class="action"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
|
||||||
',\'' + tlid +
|
|
||||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="fa text-darken-3 fa-star' +
|
|
||||||
if_fav + ' fav_' + toot.id + '"></i><span class="fav_ct">' + toot.favourites_count +
|
|
||||||
'</a></span></div>' +
|
|
||||||
'<div class="' + if_mine + ' action"><a onclick="del(\'' + toot.id +
|
|
||||||
'\',' +
|
|
||||||
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><div class="area-date_via">' +
|
|
||||||
'<div><span class="cbadge" title="via ' + $.strip_tags(via) + '">via ' +
|
|
||||||
via +
|
|
||||||
'</span></div></div></div>' +
|
|
||||||
'</div>' + divider;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
templete = templete + userparse([eachobj.account],"",acct_id,"true");
|
|
||||||
var noticetext = eachobj.account.display_name + "(" + eachobj.account.acct +
|
|
||||||
")がフォローしました";
|
|
||||||
var memory = localStorage.getItem("notice-mem");
|
|
||||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
|
||||||
Materialize.toast(noticetext, popup * 1000);
|
|
||||||
$(".notf-icon_" + tlid).addClass("red-text");
|
|
||||||
localStorage.setItem("notice-mem", noticetext);
|
|
||||||
notftext = "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (!noticetext) {
|
|
||||||
var noticetext = null;
|
|
||||||
}
|
|
||||||
return [templete, noticetext];
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//オブジェクトパーサー(トゥート)
|
//オブジェクトパーサー(トゥート)
|
||||||
function parse(obj, mix, acct_id) {
|
function parse(obj, mix, acct_id, tlid, popup) {
|
||||||
var templete = '';
|
var templete = '';
|
||||||
var datetype = localStorage.getItem("datetype");
|
var datetype = localStorage.getItem("datetype");
|
||||||
var nsfwtype = localStorage.getItem("nsfw");
|
var nsfwtype = localStorage.getItem("nsfw");
|
||||||
|
@ -9,6 +9,9 @@ function parse(obj, mix, acct_id) {
|
||||||
if (!sent) {
|
if (!sent) {
|
||||||
var sent = 500;
|
var sent = 500;
|
||||||
}
|
}
|
||||||
|
if (!ltr) {
|
||||||
|
var ltr = 500;
|
||||||
|
}
|
||||||
if (!nsfwtype || nsfwtype == "yes") {
|
if (!nsfwtype || nsfwtype == "yes") {
|
||||||
var nsfw = "ok";
|
var nsfw = "ok";
|
||||||
} else {
|
} else {
|
||||||
|
@ -29,6 +32,41 @@ function parse(obj, mix, acct_id) {
|
||||||
var local = [];
|
var local = [];
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var toot = obj[key];
|
var toot = obj[key];
|
||||||
|
if(popup){
|
||||||
|
if (toot.type == "mention") {
|
||||||
|
var what = "返信しました";
|
||||||
|
} else if (toot.type == "reblog") {
|
||||||
|
var what = "ブーストしました";
|
||||||
|
} else if (toot.type == "favourite") {
|
||||||
|
var what = "お気に入り登録しました";
|
||||||
|
}
|
||||||
|
var noticetext = '<span class="cbadge"title="' + date(toot.created_at,
|
||||||
|
'absolute') + '(通知された時間)"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
|
||||||
|
datetype) +
|
||||||
|
'</span><a onclick="udg(\'' + toot.account.id +
|
||||||
|
'\',\'' + acct_id + '\')" class="pointer">' + toot.account.display_name +
|
||||||
|
"(" + toot.account.acct +
|
||||||
|
")</a>が" + what;
|
||||||
|
var toot = toot.status;
|
||||||
|
var notice = noticetext;
|
||||||
|
var memory = localStorage.getItem("notice-mem");
|
||||||
|
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
||||||
|
Materialize.toast(noticetext, popup * 1000);
|
||||||
|
$(".notf-icon_" + tlid).addClass("red-text");
|
||||||
|
localStorage.setItem("notice-mem", noticetext);
|
||||||
|
noticetext = "";
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if (toot.reblog) {
|
||||||
|
var notice = toot.account.display_name + "(" + toot.account.acct +
|
||||||
|
")がブースト<br>";
|
||||||
|
var boostback = "shared";
|
||||||
|
var toot = toot.reblog;
|
||||||
|
} else {
|
||||||
|
var notice = "";
|
||||||
|
var boostback = "";
|
||||||
|
}
|
||||||
|
}
|
||||||
var id = toot.id;
|
var id = toot.id;
|
||||||
//Integratedである場合はUnix時間をキーに配列を生成しておく
|
//Integratedである場合はUnix時間をキーに配列を生成しておく
|
||||||
if (mix == "mix") {
|
if (mix == "mix") {
|
||||||
|
@ -42,15 +80,6 @@ function parse(obj, mix, acct_id) {
|
||||||
var home = "";
|
var home = "";
|
||||||
var divider = '<div class="divider"></div>';
|
var divider = '<div class="divider"></div>';
|
||||||
}
|
}
|
||||||
if (toot.reblog) {
|
|
||||||
var notice = toot.account.display_name + "(" + toot.account.acct +
|
|
||||||
")がブースト<br>";
|
|
||||||
var boostback = "shared";
|
|
||||||
var toot = toot.reblog;
|
|
||||||
} else {
|
|
||||||
var notice = "";
|
|
||||||
var boostback = "";
|
|
||||||
}
|
|
||||||
if (toot.account.locked) {
|
if (toot.account.locked) {
|
||||||
var locked = ' <i class="fa fa-lock red-text"></i>';
|
var locked = ' <i class="fa fa-lock red-text"></i>';
|
||||||
} else {
|
} else {
|
||||||
|
@ -166,15 +195,19 @@ function parse(obj, mix, acct_id) {
|
||||||
if (visen == "public") {
|
if (visen == "public") {
|
||||||
var vis =
|
var vis =
|
||||||
'<i class="text-darken-3 material-icons gray sml" title="公開">public</i>';
|
'<i class="text-darken-3 material-icons gray sml" title="公開">public</i>';
|
||||||
|
var can_rt = "";
|
||||||
} else if (visen == "unlisted") {
|
} else if (visen == "unlisted") {
|
||||||
var vis =
|
var vis =
|
||||||
'<i class="text-darken-3 material-icons blue-text" title="未収載">lock_open</i>';
|
'<i class="text-darken-3 material-icons blue-text" title="未収載">lock_open</i>';
|
||||||
|
var can_rt = "";
|
||||||
} else if (visen == "plivate") {
|
} else if (visen == "plivate") {
|
||||||
var vis =
|
var vis =
|
||||||
'<i class="text-darken-3 material-icons orange-text" title="非公開">lock</i>';
|
'<i class="text-darken-3 material-icons orange-text" title="非公開">lock</i>';
|
||||||
|
var can_rt = "hide";
|
||||||
} else if (visen == "direct") {
|
} else if (visen == "direct") {
|
||||||
var vis =
|
var vis =
|
||||||
'<i class="text-darken-3 material-icons red-text" title="ダイレクト">mail</i>';
|
'<i class="text-darken-3 material-icons red-text" title="ダイレクト">mail</i>';
|
||||||
|
var can_rt = "hide";
|
||||||
}
|
}
|
||||||
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
|
if (toot.account.acct == localStorage.getItem("user_" + acct_id)) {
|
||||||
var if_mine = "";
|
var if_mine = "";
|
||||||
|
@ -216,7 +249,7 @@ function parse(obj, mix, acct_id) {
|
||||||
toot.account.display_name +
|
toot.account.display_name +
|
||||||
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;"> @' +
|
'</span><span class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; cursor:text;"> @' +
|
||||||
toot.account.acct + locked + '</span></div>' +
|
toot.account.acct + locked + '</span></div>' +
|
||||||
'<div class="area-acct"><div><span class="cbadge pointer" onclick="tootUriCopy(\'' +
|
'<div class="area-acct"><div><span class="cbadge pointer waves-effect" onclick="tootUriCopy(\'' +
|
||||||
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
|
toot.url + '\');" title="' + date(toot.created_at, 'absolute') +
|
||||||
'(クリックでトゥートURLをコピー)"><i class="fa fa-clock-o"></i>' +
|
'(クリックでトゥートURLをコピー)"><i class="fa fa-clock-o"></i>' +
|
||||||
date(toot.created_at, datetype) + '</span></div></div>' +
|
date(toot.created_at, datetype) + '</span></div></div>' +
|
||||||
|
@ -229,12 +262,12 @@ function parse(obj, mix, acct_id) {
|
||||||
'</span>' +
|
'</span>' +
|
||||||
'' + mentions + tags + '</div>' +
|
'' + mentions + tags + '</div>' +
|
||||||
'<div class="area-actions" style="padding:0; margin:0; top:-20px; display:flex; justify-content:space-around; max-width:100%; ">' +
|
'<div class="area-actions" style="padding:0; margin:0; top:-20px; display:flex; justify-content:space-around; max-width:100%; ">' +
|
||||||
'<div class="action"><span class="waves-effect waves-dark btn-flat" style="padding:0">' +
|
'<div class="action"><span style="padding:0">' +
|
||||||
vis + '</span></div><div class="action"><a onclick="re(\'' + toot.id +
|
vis + '</span></div><div class="action"><a onclick="re(\'' + toot.id +
|
||||||
'\',\'' + toot.account.acct + '\',' +
|
'\',\'' + toot.account.acct + '\',' +
|
||||||
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 class="action"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
'<div class="action '+can_rt+'"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||||
',\'' + tlid +
|
',\'' + tlid +
|
||||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
'\')" class="waves-effect waves-dark btn-flat" style="padding:0"><i class="text-darken-3 fa fa-retweet ' +
|
||||||
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
if_rt + ' rt_' + toot.id + '"></i><span class="rt_ct">' + toot.reblogs_count +
|
||||||
|
|
|
@ -64,7 +64,7 @@ function tl(type, data, acct_id, tlid) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
var templete = parse(json, '', acct_id);
|
var templete = parse(json, '', acct_id, tlid);
|
||||||
$("#timeline_" + tlid).html(templete);
|
$("#timeline_" + tlid).html(templete);
|
||||||
additional(acct_id, tlid);
|
additional(acct_id, tlid);
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
|
@ -115,7 +115,7 @@ function reload(type, cc, acct_id, tlid, data) {
|
||||||
} else if (typeA == "update") {
|
} else if (typeA == "update") {
|
||||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||||
console.log(obj);
|
console.log(obj);
|
||||||
var templete = parse([obj], '', acct_id);
|
var templete = parse([obj], '', acct_id, tlid);
|
||||||
var pool = localStorage.getItem("pool_" + tlid);
|
var pool = localStorage.getItem("pool_" + tlid);
|
||||||
if (pool) {
|
if (pool) {
|
||||||
pool = templete + pool;
|
pool = templete + pool;
|
||||||
|
@ -153,7 +153,6 @@ function moreload(type, tlid) {
|
||||||
var data=obj[tlid].data;
|
var data=obj[tlid].data;
|
||||||
}
|
}
|
||||||
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
var sid = $("#timeline_" + tlid + " .cvo").last().attr("toot-id");
|
||||||
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") {
|
||||||
|
@ -178,7 +177,7 @@ function moreload(type, tlid) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
var templete = parse(json, '', acct_id);
|
var templete = parse(json, '', acct_id, tlid);
|
||||||
$("#timeline_" + tlid).append(templete);
|
$("#timeline_" + tlid).append(templete);
|
||||||
additional(acct_id, tlid);
|
additional(acct_id, tlid);
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
|
|
|
@ -63,20 +63,20 @@
|
||||||
var acct = obj[key];
|
var acct = obj[key];
|
||||||
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
|
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
|
||||||
'"><div class="notice-box z-depth-2">'+
|
'"><div class="notice-box z-depth-2">'+
|
||||||
'<div class="area-notice"><i class="material-icons" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;"></i></div>'+
|
'<div class="area-notice"><i class="material-icons waves-effect" id="notice_icon_' + key + '" style="font-size:40px; padding-top:25%;" onclick="goTop(' + key + ')"></i></div>'+
|
||||||
'<div class="area-notice_name"><span id="notice_' + key + '"" class="tl-title"></span></div>'+
|
'<div class="area-notice_name"><span id="notice_' + key + '"" class="tl-title"></span></div>'+
|
||||||
'<div class="area-a1"><a onclick="notfToggle(' + acct.domain + ',' + key +
|
'<div class="area-a1"><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 waves-effect nex notf-icon_' +
|
||||||
key + '">notifications</i></a></div>'+
|
key + '">notifications</i></a></div>'+
|
||||||
'<div class="area-a2"><a onclick="removeColumn(' + key +
|
'<div class="area-a2"><a onclick="removeColumn(' + key +
|
||||||
')" class="setting nex"><i class="material-icons nex" title="このカラムを削除">remove_circle</i></a></div>'+
|
')" class="setting nex"><i class="material-icons waves-effect nex" title="このカラムを削除">remove_circle</i></a></div>'+
|
||||||
'<div class="area-a3"><a onclick="mediaToggle(' + key +
|
'<div class="area-a3"><a onclick="mediaToggle(' + key +
|
||||||
')" class="setting nex"><i class="material-icons nex" title="メディアフィルター">perm_media</i><span id="sta-media-' +
|
')" class="setting nex"><i class="material-icons waves-effect nex" title="メディアフィルター">perm_media</i><span id="sta-media-' +
|
||||||
key + '">On</span></div>'+
|
key + '">On</span></div>'+
|
||||||
'<div class="area-a4"><a onclick="cardToggle(' + key +
|
'<div class="area-a4"><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 waves-effect nex" title="リンクの解析を切り替え(OFFで制限を回避出来る場合があります)">link</i><span id="sta-card-' +
|
||||||
key + '">On</span></a></div>'+
|
key + '">On</span></a></div>'+
|
||||||
'<div class="area-a5"><a onclick="goTop(' + key + ')" class="setting nex"><i class="material-icons nex" title="一番上へ">vertical_align_top</i></a></div>'+
|
'<div class="area-a5"><a onclick="goTop(' + key + ')" class="setting nex"><i class="material-icons waves-effect nex" title="一番上へ">vertical_align_top</i></a></div>'+
|
||||||
'<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 class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
|
'"></div></div></div><div class="tl-box" tlid="' + key + '"><div id="timeline_' + key +
|
||||||
|
|
|
@ -28,7 +28,6 @@ function scrollck() {
|
||||||
var scrt = $(this).find(".tl").height() - 1500;
|
var scrt = $(this).find(".tl").height() - 1500;
|
||||||
var scr = $(this).scrollTop();
|
var scr = $(this).scrollTop();
|
||||||
if (scr > scrt) {
|
if (scr > scrt) {
|
||||||
console.log("続き")
|
|
||||||
moreload('', tlid);
|
moreload('', tlid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "TheDesk",
|
"name": "TheDesk",
|
||||||
"version": "12.6.1",
|
"version": "12.7.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