TheDesk Mizuki (ver.3)
This commit is contained in:
parent
28b548d49f
commit
cc81ca2762
220
app/cro.html
220
app/cro.html
|
@ -1,220 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="ja">
|
||||
<head>
|
||||
<title>Croudia</title>
|
||||
<meta content="width=device-width,initial-scale=1.0" name="viewport">
|
||||
<link href='./css/font-awesome.css' rel='stylesheet' type='text/css'>
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
|
||||
<style>
|
||||
.nav-icon-cro{
|
||||
font-size:200%;
|
||||
}
|
||||
.nav-series{
|
||||
float:right;
|
||||
font-size:70%;
|
||||
margin-right:20px;
|
||||
width:40px;
|
||||
text-align:center;
|
||||
}
|
||||
#footer{
|
||||
padding:5px;
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
display:flex;
|
||||
width:100vw;
|
||||
justify-content:space-around;
|
||||
background-color:#3387A1;
|
||||
color:white;
|
||||
}
|
||||
#notice{
|
||||
background-color: #e8e8e8;
|
||||
padding:5px;
|
||||
width:100vw;
|
||||
}
|
||||
.cvo {
|
||||
padding-left: 5px;
|
||||
padding-right: 2px;
|
||||
word-break: break-all;
|
||||
width: 100%;
|
||||
display: grid;
|
||||
grid-template-columns: 43px 2fr 1fr;
|
||||
grid-template-areas: 'notice notice notice' 'icon display_name acct' 'icon toot toot' 'icon additional additional' 'actions actions date_via';
|
||||
}
|
||||
|
||||
.area-notice {
|
||||
margin:2px;
|
||||
grid-area: notice;
|
||||
}
|
||||
|
||||
.area-icon {
|
||||
width:40px;
|
||||
margin:2px;
|
||||
grid-area: icon;
|
||||
}
|
||||
|
||||
.area-display_name {
|
||||
user-select: auto;
|
||||
height:1.5em;
|
||||
margin:2px;
|
||||
overflow:hidden;
|
||||
grid-area: display_name;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.area-acct {
|
||||
margin:2px;
|
||||
grid-area: acct;
|
||||
overflow:hidden;
|
||||
text-align:right;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.area-toot {
|
||||
cursor:text;
|
||||
user-select: auto;
|
||||
margin:2px;
|
||||
grid-area: toot;
|
||||
}
|
||||
|
||||
.area-date_via {
|
||||
text-align:right;
|
||||
grid-area: date_via;
|
||||
}
|
||||
|
||||
.area-additional {
|
||||
cursor:text;
|
||||
user-select: auto;
|
||||
grid-area: additional;
|
||||
font-size:80%;
|
||||
}
|
||||
|
||||
.area-actions {
|
||||
margin:2px;
|
||||
grid-area: actions;
|
||||
height: 50px;
|
||||
font-size: 150%;
|
||||
color: grey;
|
||||
}
|
||||
.tl{
|
||||
height:calc(100vh - 140px);
|
||||
overflow-y:scroll;
|
||||
overflow-x:hidden;
|
||||
}
|
||||
p:last-child{
|
||||
margin-bottom:0;
|
||||
}
|
||||
#side{
|
||||
position:fixed;
|
||||
top:70vh;
|
||||
right:0;
|
||||
background-color: rbga(0,0,0,0.8);
|
||||
color:white;
|
||||
}
|
||||
/*スクロールバー*/
|
||||
::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
height: 5px;
|
||||
background: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
::-webkit-scrollbar-track {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* Handle */
|
||||
::-webkit-scrollbar-thumb {
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
background: #9e9e9e;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
.pointer{
|
||||
cursor:pointer;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body style="height:100vh; overflow:hidden;">
|
||||
<script>
|
||||
var websocketOld = [];
|
||||
var websocket = [];
|
||||
var websocketHome = [];
|
||||
var websocketLocal = [];
|
||||
var websocketNotf = [];
|
||||
</script>
|
||||
<nav class="navbar navbar-toggleable-md navbar-light bg-faded" style="background-color:#3387A1; color:white; padding-top:10px;">
|
||||
<div style="position:absolute; right:0;">
|
||||
<div class="nav-series pointer"><i class="fa fa-edit nav-icon-cro" data-toggle="modal" data-target="#myModal"></i><br>ささやく</div>
|
||||
<div class="nav-series pointer" onclick="alert('設計中')"><i class="fa fa-search nav-icon-cro"></i><br>検索</div>
|
||||
<div class="nav-series pointer" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"><i class="fa fa-bars nav-icon-cro"></i><br>メニュー</div>
|
||||
|
||||
</div>
|
||||
<a class="navbar-brand" href="#" style="color:white; font-size:130%;">CroDesk</a>
|
||||
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent" style="color:white;">
|
||||
© Cutls P and foolish people on kirishima.cloud.<br>クローディア・Croudiaはクローディア株式会社の登録商標です。
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">ささやく</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<!--hidden area-->
|
||||
<input type="hidden" id="reply">
|
||||
<input type="hidden" id="media">
|
||||
<input type="hidden" value="0" id="post-acct-sel">
|
||||
<textarea id="textarea" placeholder="今どうしてる?" style="width:100%;"></textarea>
|
||||
<span id="vis" style="display:none">public</span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary pointer" data-dismiss="modal">閉じる</button>
|
||||
<button type="button" class="btn btn-primary pointer" onclick="post()">ささやく</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="side">上へ</div>
|
||||
<div id="notice_0"></div>
|
||||
<div class="tl-box" tlid="0"><div id="timeline_0" class="tl" tlid="0"><div style="text-align:center">[ここにトゥートはありません。]</div></div></div>
|
||||
<div id="footer">
|
||||
<div class="nav-series pointer" onclick="tl('home', '', 0, 0)"><i class="fa fa-home nav-icon-cro"></i><br>ホーム</div>
|
||||
<div class="nav-series pointer" onclick="tl('local', '', 0, 0)"><i class="fa fa-users nav-icon-cro"></i><br>ローカル</div>
|
||||
<div class="nav-series pointer" onclick="tl('pub', '', 0, 0)"><i class="fa fa-globe nav-icon-cro"></i><br>連合</div>
|
||||
<div class="nav-series pointer" onclick="alert('設計中')"><i class="fa fa-user nav-icon-cro"></i><br>プロフ</div>
|
||||
<div class="nav-series pointer" onclick="alert('設計中')"><i class="fa fa-cog nav-icon-cro"></i><br>設定</div>
|
||||
</div>
|
||||
<!--大量のデフォルト絵文字-->
|
||||
<script type="text/javascript" src="./js/emoji/emoji-map.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/activity.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/flag.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/food.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/nature.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/object.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/people.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/place.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/symbol.js"></script>
|
||||
<script type="text/javascript" src="./js/emoji/default-emoji.js"></script>
|
||||
|
||||
<script type="text/javascript" src="./js/common/jquery.js"></script>
|
||||
<script type="text/javascript" src="./js/platform/first.js"></script>
|
||||
<script type="text/javascript" src="./js/common/time.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/scroll.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/date.js"></script>
|
||||
<script type="text/javascript" src="./js/post/status.js"></script>
|
||||
<script type="text/javascript" src="./js/post/post.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/tl.js"></script>
|
||||
<script type="text/javascript" src="./js/cro/parse.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
|
||||
<script>tl('home', '', 0, 0)</script>
|
||||
<script type="text/javascript" src="./js/platform/end.js"></script>
|
||||
</body>
|
|
@ -1,11 +0,0 @@
|
|||
<!doctype html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>503 Fools Tooter</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>503 Service Unavailable</h1>
|
||||
<u>4月1日</u>よりTheDeskはCroudiaクライアントとして生まれ変わりました。<br><br><br><br>
|
||||
TheDeskは2017年12月30日 23:59に終了したCroudiaというSNSのクライアントから始まりました。(Since 2016-5 as CroudiaDeck)<br>
|
||||
<a onclick="localStorage.setItem('sincere','true'); location.href='index.html';" style="cursor:pointer;">TheDeskに戻る</a>
|
||||
</body>
|
|
@ -26,7 +26,7 @@
|
|||
<script type="text/javascript" src="./js/ui/jquery-ui.min.js"></script>
|
||||
<script>
|
||||
//必ずアプデ時のremove instance消して!
|
||||
var ver="Mizuki (ver.2)";
|
||||
var ver="Mizuki (ver.3)";
|
||||
//betaを入れるとバージョンチェックしない
|
||||
//var ver="beta";
|
||||
var acct_id=0;
|
||||
|
@ -110,6 +110,21 @@ var tlid=0;
|
|||
<i class="material-icons left">close</i>閉じる
|
||||
</button>
|
||||
</div>
|
||||
<!--リスト-->
|
||||
<div id="list-box" class="hide notf-box z-depth-4">
|
||||
アカウント選択
|
||||
<div class="input-field">
|
||||
<select id="list-acct-sel" class="acct-sel"></select>
|
||||
<label></label>
|
||||
</div>
|
||||
<button class="btn waves-effect indigo" style="width:calc( 60% - 40px);" onclick="list()" data-trans-i="lists">
|
||||
リスト一覧
|
||||
</button><br><br>
|
||||
<div id="lists"></div>
|
||||
<div id="lists-user"></div>
|
||||
<input type="text" style="width:150px" id="list-add" placeholder="タイトル">
|
||||
<button class="btn waves-effect" style="width:120px;" onclick="makeNewList()">新規作成</button>
|
||||
</div>
|
||||
<div id="main">
|
||||
<!--TLのTL-->
|
||||
<div id="timeline-container">
|
||||
|
@ -154,6 +169,12 @@ var tlid=0;
|
|||
<span class="side-label" data-trans="setting">設定</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="small-menu" id="list-tgl">
|
||||
<a onclick="listToggle()" class="nex waves-effect">
|
||||
<i class="material-icons" title="リスト" data-trans-title="list">view_headline</i>
|
||||
<span class="side-label" data-trans="list">リスト</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="small-menu">
|
||||
<a href="index.html" class="nex mize waves-effect">
|
||||
<i class="material-icons nex" title="スーパーリロード" data-trans-title="reload">refresh</i>
|
||||
|
@ -183,7 +204,7 @@ var tlid=0;
|
|||
</div>
|
||||
<div id="sidebar-btm">
|
||||
<!--最小化-->
|
||||
<div id="menu-btn" class="big-menu" onclick="show()">
|
||||
<div id="menu-btn" class="big-menu" onclick="show()" style="display:none;">
|
||||
<a class="waves-effect">
|
||||
<i class="material-icons big-icon">mode_edit</i>
|
||||
<br>
|
||||
|
@ -534,6 +555,9 @@ var tlid=0;
|
|||
<li class="custom-tab col my-data-width only-his-data">
|
||||
<a go="#his-action">他アカウントで操作</a>
|
||||
</li>
|
||||
<li class="custom-tab col my-data-width only-his-data">
|
||||
<a go="#his-list">リスト</a>
|
||||
</li>
|
||||
<li class="custom-tab col my-data-width only-my-data">
|
||||
<a go="#his-fav-list">お気に入り登録</a>
|
||||
</li>
|
||||
|
@ -576,6 +600,11 @@ var tlid=0;
|
|||
または<br>
|
||||
<a href="#!" class="waves-effect btn" onclick="udgEx('selector', 'selector')">プロフを開く</a><br>
|
||||
</div>
|
||||
<div id="his-list" class="col s12 tab-content">
|
||||
<div id="his-lists-a"></div>
|
||||
|
||||
<div id="his-lists-b"></div>
|
||||
</div>
|
||||
<div id="his-fav-list" class="col s12 tab-content">
|
||||
<div id="his-fav-list-contents" class="cont-series">
|
||||
</div>
|
||||
|
@ -702,6 +731,7 @@ var tlid=0;
|
|||
<script type="text/javascript" src="./js/tl/src.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/filter.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/tag.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/list.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/post-box.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/layout.js"></script>
|
||||
<script type="text/javascript" src="./js/login/login.js"></script>
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
//バージョンチェッカー
|
||||
function verck(ver) {
|
||||
var date=new Date();
|
||||
var month = date.getMonth()+1;
|
||||
var day = date.getDate();
|
||||
if(month=="4" && day=="1" && !localStorage.getItem("sincere")){
|
||||
var electron = require("electron");
|
||||
var ipc = electron.ipcRenderer;
|
||||
ipc.send('fool', "true");
|
||||
location.href="error.html";
|
||||
}else{
|
||||
localStorage.removeItem("sincere")
|
||||
}
|
||||
localStorage.setItem("ver", ver);
|
||||
var l = 5;
|
||||
|
||||
|
|
|
@ -1,439 +0,0 @@
|
|||
//オブジェクトパーサー(トゥート)
|
||||
function parse(obj, mix, acct_id, tlid, popup) {
|
||||
var templete = '';
|
||||
var datetype = localStorage.getItem("datetype");
|
||||
var nsfwtype = localStorage.getItem("nsfw");
|
||||
var sent = localStorage.getItem("sentence");
|
||||
var ltr = localStorage.getItem("letters");
|
||||
var gif = localStorage.getItem("gif");
|
||||
var imh = localStorage.getItem("img-height");
|
||||
//クライアント強調
|
||||
var emp = localStorage.getItem("client_emp");
|
||||
if(emp){
|
||||
var emp = JSON.parse(emp);
|
||||
}
|
||||
//クライアントミュート
|
||||
var mute = localStorage.getItem("client_mute");
|
||||
if(mute){
|
||||
var mute = JSON.parse(mute);
|
||||
}
|
||||
//ユーザー強調
|
||||
var useremp = localStorage.getItem("user_emp");
|
||||
if(useremp){
|
||||
var useremp = JSON.parse(useremp);
|
||||
}
|
||||
//ワード強調
|
||||
var wordemp = localStorage.getItem("word_emp");
|
||||
if(wordemp){
|
||||
var wordemp = JSON.parse(wordemp);
|
||||
}
|
||||
//ワードミュート
|
||||
var wordmute = localStorage.getItem("word_mute");
|
||||
if(wordmute){
|
||||
var wordmute = JSON.parse(wordmute);
|
||||
}
|
||||
if (!sent) {
|
||||
var sent = 500;
|
||||
}
|
||||
if (!ltr) {
|
||||
var ltr = 500;
|
||||
}
|
||||
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";
|
||||
}
|
||||
if (!gif) {
|
||||
var gif = "yes";
|
||||
}
|
||||
if (!imh) {
|
||||
var imh = "200";
|
||||
}
|
||||
if(!emp){
|
||||
var emp=[];
|
||||
}
|
||||
if(!mute){
|
||||
var mute=[];
|
||||
}
|
||||
if(!useremp){
|
||||
var useremp=[];
|
||||
}
|
||||
if(!wordemp){
|
||||
var wordemp=[];
|
||||
}
|
||||
if(!wordmute){
|
||||
var wordmute=[];
|
||||
}
|
||||
|
||||
var local = [];
|
||||
var times=[];
|
||||
Object.keys(obj).forEach(function(key) {
|
||||
var toot = obj[key];
|
||||
if (toot.reblog) {
|
||||
var notice = toot.account.display_name + "(" + toot.account.acct +
|
||||
")がブースト<br>";
|
||||
var boostback = "shared";
|
||||
var toot = toot.reblog;
|
||||
}else{
|
||||
var notice="";
|
||||
}
|
||||
var id = toot.id;
|
||||
var divider = '<div class="divider"></div>';
|
||||
if (toot.account.locked) {
|
||||
var locked = ' <i class="fa fa-lock red-text"></i>';
|
||||
} else {
|
||||
var locked = "";
|
||||
}
|
||||
if (!toot.application) {
|
||||
var via = 'Unknown';
|
||||
} else {
|
||||
var via = toot.application.name;
|
||||
//ミュートチェック
|
||||
Object.keys(mute).forEach(function(key7) {
|
||||
var cli = mute[key7];
|
||||
if(cli == via){
|
||||
boostback = "hide";
|
||||
}
|
||||
});
|
||||
}
|
||||
if (toot.spoiler_text && cw) {
|
||||
var content = toot.content;
|
||||
var spoil = escapeHTML(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><br>';
|
||||
} else {
|
||||
var ct1 = toot.content.split('</p>').length + toot.content.split('<br />').length -2;
|
||||
var ct2 = toot.content.split('</p>').length + toot.content.split('<br>').length -2;
|
||||
if(ct1>ct2){ var ct= ct1; }else{ var ct= ct2; }
|
||||
if ((sent < ct && $.mb_strlen($.strip_tags(toot.content)) > 5) || ($.strip_tags(toot.content).length > ltr && $.mb_strlen($.strip_tags(toot.content)) > 5)) {
|
||||
var content = '<span class="gray">以下全文</span><br>' + toot.content
|
||||
var spoil = '<span class="cw-long-' + toot.id + '">' + $.mb_substr($.strip_tags(
|
||||
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><br>';
|
||||
} else {
|
||||
var content = toot.content;
|
||||
var spoil = escapeHTML(toot.spoiler_text);
|
||||
var spoiler = "";
|
||||
var spoiler_show = "";
|
||||
}
|
||||
}
|
||||
var urls = content.match(
|
||||
/https?:\/\/([-a-zA-Z0-9@.]+)\/?(?!.*((media|tags)|mentions)).*([-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)?/
|
||||
);
|
||||
if (urls) {
|
||||
var analyze = '<a onclick="additionalIndv(\'' + tlid + '\',' + acct_id +
|
||||
',\'' + id + '\')" class="add-show pointer">URL解析</a><br>';
|
||||
} else {
|
||||
var analyze = '';
|
||||
}
|
||||
var viewer = "";
|
||||
var hasmedia = "";
|
||||
var youtube = "";
|
||||
if(toot.emojis){
|
||||
var emojick = toot.emojis[0];
|
||||
}else{
|
||||
var emojick=false;
|
||||
}
|
||||
//絵文字があれば
|
||||
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 +
|
||||
'" class="emoji-img">';
|
||||
var regExp = new RegExp(":" + shortcode + ":", "g");
|
||||
content = content.replace(regExp, emoji_url);
|
||||
spoil = spoil.replace(regExp, emoji_url);
|
||||
});
|
||||
}
|
||||
//デフォ絵文字
|
||||
var defemo=content.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g);
|
||||
|
||||
if(defemo && defemo[0]){
|
||||
defemo = defemo.filter(function (x, i, self) {
|
||||
return self.indexOf(x) === i;
|
||||
});
|
||||
Object.keys(defemo).forEach(function(key12) {
|
||||
var demo=defemo[key12];
|
||||
var regExp = new RegExp(demo, "g");
|
||||
for(var i=0;i<map.length;i++){
|
||||
var imap=map[i];
|
||||
//console.log(regExp);
|
||||
if (imap.emoji.match(regExp)) {
|
||||
for(var l=0;l<defaultemojiList.length;l++){
|
||||
var catlist=defaultemoji[defaultemojiList[l]];
|
||||
for(var m=0;m<catlist.length;m++){
|
||||
var imoji=catlist[m];
|
||||
if(imoji.shortcode==imap.name){
|
||||
content=content.replace(regExp,'<span style="width: 20px; height: 20px; display: inline-block; background-image: url(\'./img/sheet.png\'); background-size: 4900%; background-position: '+imoji["css"]+';"></span>');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
var mediack = toot.media_attachments[0];
|
||||
//メディアがあれば
|
||||
if (mediack) {
|
||||
hasmedia = "hasmedia";
|
||||
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 + '<img src="' +
|
||||
purl + '" class="' + sense +
|
||||
' toot-img pointer" style="width:' + cwdt + '%; height:'+imh+'px;">';
|
||||
});
|
||||
} else {
|
||||
viewer = "";
|
||||
hasmedia = "nomedia";
|
||||
}
|
||||
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 + '\',' +
|
||||
acct_id + ')" class="pointer">@' + mention.acct + '</a> ';
|
||||
});
|
||||
mentions = '<div style="float:right">' + mentions + '</div>';
|
||||
}
|
||||
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="tagShow(\'' + tag.name + '\')" class="pointer">#' + tag.name + '</a><span class="hide" data-tag="' + tag.name + '"> <a onclick="tl(\'tag\',\'' + tag.name + '\',' + acct_id +
|
||||
',\'add\')" class="pointer" title="#' + tag.name + 'のタイムライン">TL</a> <a onclick="brInsert(\'#' + tag.name + '\')" class="pointer" title="#' + tag.name + 'でトゥート">Toot</a> '+
|
||||
'<a onclick="tagPin(\'' + tag.name + '\')" class="pointer" title="#' + tag.name + 'をよく使うタグへ">Pin</a></span> ';
|
||||
});
|
||||
tags = '<div style="float:right">' + tags + '</div>';
|
||||
}
|
||||
//公開範囲を取得
|
||||
var vis = "";
|
||||
var visen = toot.visibility;
|
||||
if (visen == "public") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons gray sml" title="公開">public</i>';
|
||||
var can_rt = "";
|
||||
} else if (visen == "unlisted") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons blue-text" title="未収載">lock_open</i>';
|
||||
var can_rt = "";
|
||||
} else if (visen == "plivate") {
|
||||
var vis =
|
||||
'<i class="text-darken-3 material-icons orange-text" title="非公開">lock</i>';
|
||||
var can_rt = "hide";
|
||||
} else if (visen == "direct") {
|
||||
var vis =
|
||||
'<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)) {
|
||||
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 = "";
|
||||
}
|
||||
if (toot.pinned) {
|
||||
var if_pin = "blue-text";
|
||||
var pin_app = "pinned";
|
||||
} else {
|
||||
var if_pin = "";
|
||||
var pin_app = "";
|
||||
}
|
||||
//アニメ再生
|
||||
if (gif == "yes") {
|
||||
var avatar = toot.account.avatar;
|
||||
} else {
|
||||
var avatar = toot.account.avatar_static;
|
||||
}
|
||||
//ワードミュート
|
||||
if(wordmute){
|
||||
Object.keys(wordmute).forEach(function(key8) {
|
||||
var worde = wordmute[key8];
|
||||
if(worde){
|
||||
var word=worde.tag;
|
||||
var regExp = new RegExp( word, "g" ) ;
|
||||
if(content.match(regExp)){
|
||||
boostback = "hide";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
//ワード強調
|
||||
if(wordemp){
|
||||
Object.keys(wordemp).forEach(function(key9) {
|
||||
var word = wordemp[key9];
|
||||
if(word){
|
||||
var word=word.tag;
|
||||
var regExp = new RegExp( word, "g" ) ;
|
||||
content=content.replace(regExp,'<span class="emp">'+word+"</span>");
|
||||
}
|
||||
});
|
||||
}
|
||||
templete = templete + '<div id="pub_' + toot.id + '" class="cvo ' +
|
||||
boostback + ' ' + fav_app + ' ' + rt_app + ' ' + pin_app +
|
||||
' ' + hasmedia + '" toot-id="' + id + '" unixtime="' + date(obj[
|
||||
key].created_at, 'unix') + '">' +
|
||||
'<div class="area-notice"><span class="gray sharesta">' + notice +
|
||||
'</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">' +
|
||||
escapeHTML(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 waves-effect" 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 style="color:green;"><span class="rt_ct">' + toot.reblogs_count +
|
||||
'</span>シェア</span><br><span style="color:orange;"><i class="fa fa-star"></i><span class="fav_ct">' + toot.favourites_count +
|
||||
'</a></span></span><br><a onclick="details(\'' + toot.id + '\',' + acct_id +
|
||||
','+tlid+')" class="waves-effect waves-dark btn-flat details" style="padding:0; color:#0275d8; font-size:80%;">詳細</a></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 style="padding:0">' +
|
||||
vis + '</span></div><div class="action"><a onclick="re(\'' + toot.id +
|
||||
'\',\'' + toot.account.acct + '\',' +
|
||||
acct_id + ',\''+visen+
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートに返信"><i class="fa fa-share"></i></a></div>' +
|
||||
'<div class="action '+can_rt+'"><a onclick="rt(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをブースト"><i class="text-darken-3 fa fa-retweet ' +
|
||||
if_rt + ' rt_' + toot.id + '"></i></a></div>' +
|
||||
'<div class="action"><a onclick="fav(\'' + toot.id + '\',' + acct_id +
|
||||
',\'' + tlid +
|
||||
'\')" class="waves-effect waves-dark btn-flat" style="padding:0" title="このトゥートをお気に入り登録"><i class="fa text-darken-3 fa-star' +
|
||||
if_fav + ' fav_' + toot.id + '"></i></div>' +
|
||||
'<div class="' + if_mine + ' action"></div>' +
|
||||
'<div class="action"></div>' +
|
||||
'</div><div class="area-date_via">' +
|
||||
'<div><span class="cbadge waves-effect" onclick="client(\''+$.strip_tags(via)+'\')" title="via ' + $.strip_tags(via) + '">via ' +
|
||||
via +
|
||||
'</span></div></div></div>' +
|
||||
'</div>' + divider;
|
||||
});
|
||||
if (mix == "mix") {
|
||||
return [templete, local, times]
|
||||
} else {
|
||||
return templete;
|
||||
}
|
||||
}
|
||||
|
||||
//オブジェクトパーサー(ユーザーデータ)
|
||||
function userparse(obj, auth, acct_id, tlid, popup) {
|
||||
var templete = '';
|
||||
var datetype = localStorage.getItem("datetype");
|
||||
Object.keys(obj).forEach(function(key) {
|
||||
var toot = obj[key];
|
||||
if (toot.locked) {
|
||||
var locked = ' <i class="fa fa-lock red-text"></i>';
|
||||
} else {
|
||||
var locked = "";
|
||||
}
|
||||
if (auth) {
|
||||
var auth = '<i class="material-icons gray pointer" onclick="request(\'' +
|
||||
toot.id + '\',\'authorize\',' + acct_id + ')">person_add</i>';
|
||||
} else {
|
||||
var auth = "";
|
||||
}
|
||||
if(popup > 0){
|
||||
var notftext='<span class="cbadge"title="' + date(toot.created_at,
|
||||
'absolute') + '(通知された時間)"><i class="fa fa-clock-o"></i>' + date(toot.created_at,
|
||||
datetype) +
|
||||
'</span>フォローされました。<br>';
|
||||
}else{
|
||||
var notftext="";
|
||||
}
|
||||
var memory = localStorage.getItem("notice-mem");
|
||||
if (popup >= 0 && obj.length < 5 && noticetext != memory) {
|
||||
Materialize.toast(escapeHTML(toot.display_name)+"にフォローされました", popup * 1000);
|
||||
$(".notf-icon_" + tlid).addClass("red-text");
|
||||
localStorage.setItem("notice-mem", noticetext);
|
||||
noticetext = "";
|
||||
}
|
||||
templete = templete +
|
||||
'<div class="" style="padding-top:5px;" user-id="' + toot.id + '">' +
|
||||
notftext +
|
||||
'<div style="padding:0; margin:0; width:400px; max-width:100%; display:flex; align-items:flex-end;">' +
|
||||
'<div style="flex-basis:40px;"><a onclick="udg(\'' + toot.id + '\',' +
|
||||
acct_id + ');" user="' + toot.acct + '" class="udg">' +
|
||||
'<img src="' + toot.avatar + '" width="40" class="prof-img" user="' + toot
|
||||
.acct + '"></a></div>' +
|
||||
'<div style="flex-grow:3; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"><big>' +
|
||||
escapeHTML(toot.display_name) + '</big></div>' +
|
||||
'<div class="sml gray" style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"> @' +
|
||||
toot.acct + locked + '</div>' +
|
||||
'</div>' + auth +
|
||||
'<div style="justify-content:space-around"> <div class="cbadge" style="width:100px;">Follows:' +
|
||||
toot.following_count +
|
||||
'</div><div class="cbadge" style="width:100px;">Followers:' + toot.followers_count +
|
||||
'</div>' +
|
||||
'<div class="divider"></div>' +
|
||||
'</div>' +
|
||||
'</div>';
|
||||
|
||||
});
|
||||
return templete;
|
||||
}
|
||||
//クライアントダイアログ
|
||||
function scrollevent(){}
|
||||
function todo(){}
|
||||
function todc(){}
|
||||
function vis(){ $('#myModal').modal('hide') }
|
||||
function additional(){}
|
||||
function re(){ alert("設計中") }
|
|
@ -209,12 +209,13 @@ function trans(tar){
|
|||
if(html.match(/^<p>(.+)<\/p>$/)){
|
||||
html = html.match(/^<p>(.+)<\/p>$/)[1];
|
||||
}
|
||||
html = html.replace(/<br\s?\/?>/, "\n");
|
||||
html = html.replace(/<p>/, "\n");
|
||||
html = html.replace(/<\/p>/, "\n");
|
||||
html = html.replace(/<br\s?\/?>/g, "\n");
|
||||
html = html.replace(/<p>/g, "\n");
|
||||
html = html.replace(/<\/p>/g, "\n");
|
||||
html=$.strip_tags(html);
|
||||
$("#toot-this .additional").text("Loading...(Powered by Google Translate)");
|
||||
var exec='https://script.google.com/macros/s/AKfycbz0ETqcUxwNlw961GjErNb7vr_X18N2s1AS5Xu5nFTbYXcdcRM/exec?text='+html+'&source='+tar+'&target=ja'
|
||||
var exec='https://script.google.com/macros/s/AKfycbz0ETqcUxwNlw961GjErNb7vr_X18N2s1AS5Xu5nFTbYXcdcRM/exec?text='+encodeURIComponent(html)+'&source='+tar+'&target=ja'
|
||||
console.log(exec);
|
||||
fetch(exec, {
|
||||
method: 'GET',
|
||||
}).then(function(response) {
|
||||
|
|
207
app/js/tl/list.js
Normal file
207
app/js/tl/list.js
Normal file
|
@ -0,0 +1,207 @@
|
|||
function listToggle(){
|
||||
if ($("#list-box").hasClass("hide")) {
|
||||
$("#list-box").removeClass("hide");
|
||||
$("#list-box").addClass("show");
|
||||
$("#list-box").css("top",$('#list-tgl').offset().top+"px");
|
||||
$("#list-box").css("left",$('#list-tgl').offset().left-410+"px");
|
||||
//リストロード
|
||||
} else {
|
||||
$("#list-box").removeClass("show");
|
||||
$("#list-box").addClass("hide")
|
||||
}
|
||||
}
|
||||
|
||||
function list(){
|
||||
$("#lists-user").html("");
|
||||
var acct_id = $("#list-acct-sel").val();
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
if (json) {
|
||||
var lists = "";
|
||||
Object.keys(json).forEach(function(key) {
|
||||
var list = json[key];
|
||||
lists = lists + list.title+':<a onclick="listShow(' + list.id + ',\'' + list.title + '\',\'' + acct_id +
|
||||
'\')" class="pointer">表示</a>/<a onclick="listUser(' + list.id + ',' + acct_id +
|
||||
')" class="pointer">ユーザー一覧</a><br> ';
|
||||
});
|
||||
$("#lists").html(lists);
|
||||
}else{
|
||||
$("#lists").html("リストはありません");
|
||||
}
|
||||
});
|
||||
}
|
||||
function makeNewList(){
|
||||
var acct_id = $("#list-acct-sel").val();
|
||||
var text=$("#list-add").val();
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
body: JSON.stringify({
|
||||
title: text
|
||||
})
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
list();
|
||||
$("#list-add").val("")
|
||||
});
|
||||
}
|
||||
function listShow(id,title,acct_id){
|
||||
localStorage.setItem("list_"+id+"_"+acct_id,title);
|
||||
tl('list',id,acct_id,'add');
|
||||
}
|
||||
function listUser(id,acct_id){
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
if (json) {
|
||||
var lists = "";
|
||||
var templete = userparse(json,'',acct_id);
|
||||
if(!json[0]){
|
||||
templete="ユーザーはいません";
|
||||
}
|
||||
$("#lists-user").html(templete);
|
||||
}else{
|
||||
$("#lists-user").html("ユーザーはいません");
|
||||
}
|
||||
});
|
||||
}
|
||||
function hisList(user,acct_id){
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
if (json) {
|
||||
var lists = "リストに追加<br>";
|
||||
Object.keys(json).forEach(function(key) {
|
||||
var list = json[key];
|
||||
lists = lists + '<a onclick="listAdd(' + list.id + ',\'' + user + '\',\'' + acct_id +
|
||||
'\')" class="pointer">'+list.title+'</a><br> ';
|
||||
});
|
||||
$("#his-lists-a").html(lists);
|
||||
}else{
|
||||
$("#his-lists-a").html('リストはありません');
|
||||
}
|
||||
});
|
||||
var start = "https://" + domain + "/api/v1/accounts/"+user+"/lists"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'GET',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
if (json) {
|
||||
var lists = "リストから削除<br>";
|
||||
Object.keys(json).forEach(function(key) {
|
||||
var list = json[key];
|
||||
lists = lists + '<a onclick="listRemove(' + list.id + ',\'' + user + '\',\'' + acct_id +
|
||||
'\')" class="pointer">'+list.title+'</a><br> ';
|
||||
});
|
||||
$("#his-lists-b").html(lists);
|
||||
}else{
|
||||
$("#his-lists-b").html('リストはありません');
|
||||
}
|
||||
});
|
||||
}
|
||||
function listAdd(id,user,acct_id){
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
body: JSON.stringify({
|
||||
account_ids: [user]
|
||||
})
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
hisList(user,acct_id)
|
||||
});
|
||||
}
|
||||
function listRemove(id,user,acct_id){
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
var at = localStorage.getItem(domain + "_at");
|
||||
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
|
||||
console.log(start)
|
||||
fetch(start, {
|
||||
method: 'DELETE',
|
||||
headers: {
|
||||
'content-type': 'application/json',
|
||||
'Authorization': 'Bearer ' + at
|
||||
},
|
||||
body: JSON.stringify({
|
||||
account_ids: [user]
|
||||
})
|
||||
}).then(function(response) {
|
||||
return response.json();
|
||||
}).catch(function(error) {
|
||||
todo(error);
|
||||
console.error(error);
|
||||
}).then(function(json) {
|
||||
hisList(user,acct_id)
|
||||
});
|
||||
}
|
|
@ -4,13 +4,13 @@ function tl(type, data, acct_id, tlid) {
|
|||
localStorage.removeItem("morelock");
|
||||
localStorage.removeItem("pool");
|
||||
var domain = localStorage.getItem("domain_" + acct_id);
|
||||
//タグの場合はカラム追加して描画
|
||||
//タグとかの場合はカラム追加して描画
|
||||
if (tlid == "add") {
|
||||
console.log("add");
|
||||
var newtab = $(".box").length;
|
||||
var add = {
|
||||
domain: acct_id,
|
||||
type: "tag",
|
||||
type: type,
|
||||
data: data
|
||||
};
|
||||
var multi = localStorage.getItem("column");
|
||||
|
@ -128,6 +128,9 @@ function reload(type, cc, acct_id, tlid, data) {
|
|||
} else if (type == "noauth") {
|
||||
var start = "wss://" + acct_id +
|
||||
"/api/v1/streaming/?stream=public:local";
|
||||
} else if (type=="list"){
|
||||
var start = "wss://" + domain +
|
||||
"/api/v1/streaming/?stream=list&list=" + data +"&access_token=" + at;
|
||||
}
|
||||
console.log(start);
|
||||
var wsid = websocket.length;
|
||||
|
@ -306,7 +309,8 @@ function cap(type, data, acct_id) {
|
|||
} else if (type == "tag") {
|
||||
var response= "#" + data
|
||||
} else if (type == "list") {
|
||||
var response= "List(id:" + data + ")"
|
||||
var ltitle=localStorage.getItem("list_"+data+"_"+acct_id);
|
||||
var response= "List(" + ltitle + ")"
|
||||
} else if (type == "notf") {
|
||||
if(localStorage.getItem("notification_" + acct_id) && !locale){
|
||||
var response=localStorage.getItem("notification_" + acct_id);
|
||||
|
@ -345,6 +349,8 @@ function icon(type) {
|
|||
return "language"
|
||||
} else if (type == "tag") {
|
||||
return "search"
|
||||
} else if (type == "list") {
|
||||
return "view_headline"
|
||||
}
|
||||
if (type == "list") {
|
||||
return "subject"
|
||||
|
|
|
@ -81,11 +81,13 @@ function sortToggle(){
|
|||
$("#sort").html("");
|
||||
if ($("#sort-box").hasClass("hide")) {
|
||||
$("#sort-box").removeClass("hide");
|
||||
$("#sort-box").addClass("show");
|
||||
$("#sort-box").css("top",$('#sort-tgl').offset().top+"px");
|
||||
$("#sort-box").css("left",$('#sort-tgl').offset().left-410+"px");
|
||||
//並べ替え
|
||||
sortload();
|
||||
} else {
|
||||
$("#sort-box").addClass("hide")
|
||||
$("#sort-box").addClass("hide");
|
||||
$("#sort-box").removeClass("show");
|
||||
}
|
||||
}
|
|
@ -4,11 +4,29 @@ function spotifyConnect(){
|
|||
shell
|
||||
} = require('electron');
|
||||
|
||||
shell.openExternal(auth);
|
||||
|
||||
var electron = require("electron");
|
||||
var remote=electron.remote;
|
||||
var platform=remote.process.platform;
|
||||
if(platform=="win32"){
|
||||
shell.openExternal(auth);
|
||||
var ipc = electron.ipcRenderer;
|
||||
ipc.send('quit', 'go');
|
||||
}else{
|
||||
auth=auth+"&state=code";
|
||||
$("#spotify-code-show").removeClass("hide");
|
||||
shell.openExternal(auth);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
function spotifyAuth(){
|
||||
var code=$("#spotify-code").val();
|
||||
localStorage.setItem("spotify", "code");
|
||||
localStorage.setItem("spotify-refresh", code);
|
||||
$("#spotify-code-show").addClass("hide");
|
||||
$("#spotify-enable").addClass("disabled");
|
||||
$("#spotify-disable").removeClass("disabled");
|
||||
}
|
||||
function spotifyDisconnect(){
|
||||
localStorage.removeItem("spotify");
|
||||
|
@ -24,6 +42,9 @@ function checkSpotify(){
|
|||
$("#spotify-disable").addClass("disabled");
|
||||
}
|
||||
var content=localStorage.getItem("np-temp");
|
||||
if(!content || content==""){
|
||||
var content="#NowPlaying {song} / {album} / {artist}\n{url} #SpotifyWithTheDesk";
|
||||
}
|
||||
$("#np-temp").val(content);
|
||||
}
|
||||
function nowplaying(){
|
||||
|
@ -44,7 +65,7 @@ function nowplaying(){
|
|||
console.log(json);
|
||||
var item=json.item;
|
||||
var content=localStorage.getItem("np-temp");
|
||||
if(!content){
|
||||
if(!content || content==""){
|
||||
var content="#NowPlaying {song} / {album} / {artist}\n{url} #SpotifyWithTheDesk";
|
||||
}
|
||||
var regExp = new RegExp("{song}", "g");
|
||||
|
|
|
@ -121,6 +121,7 @@ function udg(user, acct_id) {
|
|||
$(".only-his-data").hide();
|
||||
} else {
|
||||
relations(user, acct_id);
|
||||
hisList(user,acct_id);
|
||||
$(".only-my-data").hide();
|
||||
$(".only-his-data").show();
|
||||
}
|
||||
|
|
13
app/main.js
13
app/main.js
|
@ -388,18 +388,5 @@ ipc.on('nano', function (e, x, y) {
|
|||
return "true"
|
||||
})
|
||||
|
||||
ipc.on('fool', function(e, x, y) {
|
||||
var window = new BrowserWindow({
|
||||
width: 400,
|
||||
height: 800,
|
||||
"transparent": false, // ウィンドウの背景を透過
|
||||
"frame": true, // 枠の無いウィンドウ
|
||||
"resizable": true
|
||||
});
|
||||
window.loadURL('file://' + __dirname + '/cro.html');
|
||||
|
||||
return "true"
|
||||
})
|
||||
|
||||
|
||||
app.setAsDefaultProtocolClient('thedesk')
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "TheDesk",
|
||||
"version": "13.9.0",
|
||||
"version": "14.3.0",
|
||||
"description": "TheDesk on Mastodonはシンプルと多機能を両立したデスクトップ向けクライアントです",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -183,7 +183,8 @@
|
|||
<div class="collapsible-body">
|
||||
<i class="material-icons nex" title="Radio(Select/Pause)">play_circle_outline</i>ボタンで表示されるメニューから簡単にNowPlayingができます。<br>
|
||||
<h5>アカウントの連携</h5>
|
||||
Windowsのみの対応です。APIの性質上,thedesk.topへアクセスします。<br>
|
||||
APIの性質上,thedesk.topへアクセスします。<br>
|
||||
<div id="spotify-code-show" class="hide"><input type="text" id="spotify-code"><button onclick="spotifyAuth()" class="btn waves-effect" style="width:100px;">設定</button></div>
|
||||
<a onclick="spotifyConnect()" class="btn waves-effect nex" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-enable"><i class="fa fa-spotify left"></i>接続</a>
|
||||
<a onclick="spotifyDisconnect()" class="btn waves-effect nex disabled" style="width:100%; max-width:200px; background-color:#1ed760;" id="spotify-disable"><i class="fa fa-spotify left"></i>切断</a>
|
||||
<h5>テンプレートの編集</h5>
|
||||
|
|
2
ver.json
2
ver.json
|
@ -1 +1 @@
|
|||
{"warn":"これはGCPにアップして下さい!!","warn2":"これはGCPにアップして下さい!!","warn3":"これはGCPにアップして下さい!!","desk":"Mizuki (ver.2)","date":"2018-03-31","detail":"内部V:14.2.0|Linuxバグ修正・サポートインスタンス変更ほか"}
|
||||
{"warn":"これはGCPにアップして下さい!!","warn2":"これはGCPにアップして下さい!!","warn3":"これはGCPにアップして下さい!!","desk":"Mizuki (ver.3)","date":"2018-04-01","detail":"内部V:14.3.0|リスト機能実装・SpotifyNowPlayingのプラットフォーム拡充・翻訳バグ修正ほか"}
|
Loading…
Reference in New Issue
Block a user