TheDesk Miho (ver.10)
This commit is contained in:
parent
eec72767c6
commit
1d92abf550
|
@ -132,6 +132,9 @@ blockquote:before, .quote:before {
|
|||
#drag-content {
|
||||
font-size: 200%;
|
||||
}
|
||||
.radio{
|
||||
font-family:'Yanone Kaffeesatz'
|
||||
}
|
||||
|
||||
/*black theme*/
|
||||
.blacktheme body {
|
||||
|
|
|
@ -84,12 +84,14 @@ p {
|
|||
background-color:white;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
font-family: Open Sans;
|
||||
margin-right: 10px;
|
||||
width:100%;
|
||||
z-index:1000;
|
||||
height:60px;
|
||||
}
|
||||
.tl-title {
|
||||
font-family: Open Sans;
|
||||
}
|
||||
#tools {
|
||||
position: fixed;
|
||||
top: 10px;
|
||||
|
@ -97,7 +99,7 @@ p {
|
|||
float: right;
|
||||
}
|
||||
.setting {
|
||||
font-size: 7px;
|
||||
font-size: 10px;
|
||||
color: gray;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<link href='./css/userdata.css' rel='stylesheet' type='text/css'>
|
||||
<link href='./css/post.css' rel='stylesheet' type='text/css'>
|
||||
<link href="./css/master.css" type="text/css" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300" rel="stylesheet">
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons|Open+Sans:300|Yanone+Kaffeesatz" rel="stylesheet">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
|
@ -23,7 +23,7 @@
|
|||
<script type="text/javascript" src="./js/common/keyshortcut.js"></script>
|
||||
<script type="text/javascript" src="./js/common/modal.js"></script>
|
||||
<script>
|
||||
var ver="Miho (ver.9)";
|
||||
var ver="Miho (ver.10)";
|
||||
//betaを入れるとバージョンチェックしない
|
||||
//var ver="beta";
|
||||
var acct_id=0;
|
||||
|
@ -112,6 +112,19 @@ var tlid=0;
|
|||
<a href="acct.html"><i class="material-icons nex" title="アカウント管理">account_circle</i></a>
|
||||
<a href="index.html" class="setting nex"><i class="material-icons nex" title="スーパーリロード">refresh</i></a>
|
||||
<a onclick="window.open('https://thedesk.top/labo.php');" class="setting nex" target="_blank" id="ranking-btn" style="display:none;"><i class="material-icons nex" title="アスタルテランキング">timeline</i></a>
|
||||
<a onclick="Rtoggle()" class="setting nex" id="radio-btn"><i class="material-icons nex" title="Radio">play_circle_outline</i></a><span id="radio-sta" class="radio"></span>
|
||||
<div id="radio-view" class="hide radio">
|
||||
<span class="cbadge pointer" 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" 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" onclick="Ryourself()">Others</span>
|
||||
</div>
|
||||
<div id="radio-input" class="hide radio">
|
||||
<input type="url" id="radio-url" placeholder="URL" style="width:100px">
|
||||
<button class="btn waves-effect" onclick="Rinput()">Play</button>
|
||||
<button class="btn waves-effect" onclick="Rselect()">Presets</button>
|
||||
</div>
|
||||
<div class="row" style="margin-bottom:0;">
|
||||
<span class="sml"><span class="gray">画面内どこでもドラッグ・アンド・ドロップできます。</span><br></span>アカウント選択</span><br>
|
||||
<div class="input-field">
|
||||
|
@ -129,7 +142,11 @@ var tlid=0;
|
|||
<i class="material-icons pointer setting" 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" 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" 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" 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:24px"></i>
|
||||
<i class="pointer setting fa fa-superscript" onclick="markdown('_','yes','no','before')" title="上付き文字 テキストボックス内を選択してから押すと囲みます。" style="font-size:24px"></i>
|
||||
<i class="material-icons pointer setting" onclick="tagsel('spin')" title="回転 テキストボックス内を選択してから押すと囲みます。">autorenew</i>
|
||||
<i class="material-icons pointer setting" onclick="tagsel('pulse')" title="点滅 テキストボックス内を選択してから押すと囲みます。">flare</i>
|
||||
<i class="material-icons pointer setting" onclick="tagsel('flip=vertical')" title="上下反転 テキストボックス内を選択してから押すと囲みます。">swap_vert</i>
|
||||
|
@ -351,7 +368,8 @@ var tlid=0;
|
|||
</div>
|
||||
<!--左下メッセージ-->
|
||||
<div id="message"></div>
|
||||
|
||||
<!--Radio-->
|
||||
<audio src="" id="radio"></audio>
|
||||
<script type="text/javascript" src="./js/common/about.js"></script>
|
||||
<script type="text/javascript" src="./js/tl/parse.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/scroll.js"></script>
|
||||
|
@ -368,6 +386,7 @@ var tlid=0;
|
|||
<script type="text/javascript" src="./js/ui/post-box.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/img.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/theme.js"></script>
|
||||
<script type="text/javascript" src="./js/ui/radio.js"></script>
|
||||
<script type="text/javascript" src="./js/post/post.js"></script>
|
||||
<script type="text/javascript" src="./js/post/reply.js"></script>
|
||||
<script type="text/javascript" src="./js/post/secure.js"></script>
|
||||
|
|
|
@ -17,6 +17,13 @@ $(function($) {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
//Shift+Space:Markdownゼロ幅スペース
|
||||
if (event.shiftKey) {
|
||||
if (e.keyCode === 32) {
|
||||
brInsert("");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//Esc:消す
|
||||
if (e.keyCode === 27) {
|
||||
hide();
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
$.strip_tags = function(str, allowed) {
|
||||
allowed = (((allowed || '') + '').toLowerCase().match(/<[a-z][a-z0-9]*>/g) || [])
|
||||
.join('');
|
||||
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>/gi,
|
||||
var tags = /<\/?([a-z][a-z0-9]*)\b[^>]*>?/gi,
|
||||
commentsAndPhpTags = /<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi;
|
||||
return str.replace(commentsAndPhpTags, '').replace(tags, function($0, $1) {
|
||||
return allowed.indexOf('<' + $1.toLowerCase() + '>') > -1 ? $0 : '';
|
||||
|
|
|
@ -94,8 +94,14 @@ function surroundHTML(tagS,tagE) {
|
|||
target.value = beforeNode + insertNode + afterNode;
|
||||
}
|
||||
}
|
||||
function markdown(tag,ck,br){
|
||||
surroundMD(tag,tag,ck);
|
||||
function markdown(tag,ck,br,space){
|
||||
if(space=="before"){
|
||||
tagE=tag;
|
||||
tag=" "+tag;
|
||||
}else{
|
||||
tagE=tag;
|
||||
}
|
||||
surroundMD(tag,tagE,ck,br);
|
||||
$("#textarea").focus();
|
||||
}
|
||||
function surroundMD(tagS,tagE,ck,br) {
|
||||
|
@ -204,7 +210,7 @@ function preview(){
|
|||
var bb=bb.replace(/\[colorhex=([A-Fa-f0-9]+)\](.+)\[\/colorhex\]/g,'<span style="color:#$1">$2<\/span>');
|
||||
//code
|
||||
var bb=bb.replace(/`(.+)`/g,'<code>$1<\/code>');
|
||||
//index
|
||||
//head
|
||||
var m;
|
||||
m=bb.match(/^#{1,6}(.+)$/gm);
|
||||
if(m){
|
||||
|
@ -214,12 +220,45 @@ function preview(){
|
|||
var bb=bb.replace(new RegExp(m[i], ""),indexct);
|
||||
}
|
||||
}
|
||||
//list(ul)
|
||||
var li;
|
||||
li=bb.match(/^\- (.+)$/gm);
|
||||
if(li){
|
||||
for(let l = 0; l < li.length; l++) {
|
||||
var u=li[l].match(/^\- (.+)$/);
|
||||
var listUl='<li>'+u[1]+'</li>';
|
||||
if(l == 0){
|
||||
listUl='<ul>'+listUl;
|
||||
}
|
||||
if(l==li.length-1){
|
||||
listUl=listUl+'</ul>';
|
||||
}
|
||||
var bb=bb.replace(new RegExp(li[l], ""),listUl);
|
||||
}
|
||||
}
|
||||
//list(ol)
|
||||
var li;
|
||||
li=bb.match(/^1\. (.+)$/gm);
|
||||
if(li){
|
||||
for(let l = 0; l < li.length; l++) {
|
||||
var u=li[l].match(/^1\. (.+)$/);
|
||||
var listUl='<li>'+u[1]+'</li>';
|
||||
if(l == 0){
|
||||
listUl='<ol>'+listUl;
|
||||
}
|
||||
if(l==li.length-1){
|
||||
listUl=listUl+'</ol>';
|
||||
}
|
||||
var bb=bb.replace(new RegExp(li[l], ""),listUl);
|
||||
}
|
||||
}
|
||||
//img
|
||||
var bb=bb.replace(/!\[(.+)\]\((https:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g,'<img src="$2" text="$1" style="width:100%">');
|
||||
//link
|
||||
var bb=bb.replace(/\[(.+)\]\((https?:\/\/[-_.!~*\'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)\)/g,'<a href="$2" target="_blank">$1<\/a>');
|
||||
|
||||
$("#md-preview").html(nl2br(bb));
|
||||
bb=nl2br(bb);
|
||||
bb=bb.replace(new RegExp("</li><br />", "g"),"");
|
||||
$("#md-preview").html(bb);
|
||||
}
|
||||
//Editで戻る
|
||||
function previewEdit(){
|
||||
|
|
|
@ -47,4 +47,5 @@ function cw(){
|
|||
//TLでコンテンツワーニングを表示トグル
|
||||
function cw_show(id){
|
||||
$(".cw_hide_"+id).toggleClass("cw");
|
||||
$(".cw-long-"+id).toggleClass("hide");
|
||||
}
|
|
@ -117,9 +117,11 @@ function cardToggle(tlid) {
|
|||
if (!card) {
|
||||
localStorage.setItem("card_" + tlid, "true");
|
||||
$("#sta-card-" + tlid).text("Off");
|
||||
$("#sta-card-" + tlid).css("color",'red');
|
||||
} else {
|
||||
localStorage.removeItem("card_" + tlid);
|
||||
$("#sta-card-" + tlid).text("On");
|
||||
$("#sta-card-" + tlid).css("color",'#009688');
|
||||
}
|
||||
}
|
||||
//各TL上方のLink[On/Off]をチェック
|
||||
|
@ -127,7 +129,9 @@ function cardCheck(tlid) {
|
|||
var card = localStorage.getItem("card_" + tlid);
|
||||
if (!card) {
|
||||
$("#sta-card-" + tlid).text("On");
|
||||
$("#sta-card-" + tlid).css("color",'#009688');
|
||||
} else {
|
||||
$("#sta-card-" + tlid).text("Off");
|
||||
$("#sta-card-" + tlid).css("color",'red');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,8 +65,8 @@ function parse(obj, mix, acct_id) {
|
|||
2;
|
||||
if (sent < ct && $.mb_strlen(toot.content) > 5) {
|
||||
var content = '<span class="gray">以下全文</span><br>' + toot.content
|
||||
var spoil = $.strip_tags($.mb_substr(toot.content, 0, 100)) +
|
||||
'<span class="gray">自動折りたたみ</span>';
|
||||
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>';
|
||||
|
@ -77,6 +77,15 @@ function parse(obj, mix, acct_id) {
|
|||
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];
|
||||
|
@ -177,8 +186,7 @@ function parse(obj, mix, acct_id) {
|
|||
api_spoil + ' cw_text_' + toot.id + '">' + spoil + spoiler_show +
|
||||
'</span>' +
|
||||
'' + viewer + '' +
|
||||
'<div class="additional"><a onclick="additionalIndv(\'' + tlid + '\',' + acct_id +
|
||||
',\''+id+'\')" class="add-show pointer">URL解析</a></div><span class="cbadge"><i class="fa fa-clock-o"></i>' +
|
||||
'<div class="additional">' + analyze + '</div><span class="cbadge"><i class="fa fa-clock-o"></i>' +
|
||||
date(toot.created_at, datetype) + '</span>' +
|
||||
'<span class="cbadge">via ' + via +
|
||||
'</span>' + mentions + tags +
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
Object.keys(obj).forEach(function(key) {
|
||||
var acct = obj[key];
|
||||
var html = '<div class="box" id="timeline_box_' + key + '_box" tlid="' + key +
|
||||
'"><div class="notice-box"><span id="notice_' + key + '"></span><br>' +
|
||||
'"><div class="notice-box"><span id="notice_' + key + '" class="tl-title"></span><br>' +
|
||||
'<a onclick="notfToggle(' + acct.domain + ',' + key +
|
||||
')" class="setting nex" title="このアカウントの通知"><i class="material-icons nex notf-icon_' +
|
||||
key + '">notifications</i></a>' +
|
||||
|
|
36
app/js/ui/radio.js
Normal file
36
app/js/ui/radio.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
var r = document.getElementById("radio");
|
||||
function Rtoggle(){
|
||||
if($("#radio").hasClass("play")){
|
||||
Rstop();
|
||||
}else{
|
||||
$("#radio-view").toggleClass("hide");
|
||||
$("#radio-input").addClass("hide");
|
||||
}
|
||||
}
|
||||
function Rplay(url,name){
|
||||
$("#radio").attr('src',url);
|
||||
r.load();
|
||||
r.play();
|
||||
$("#radio").addClass("play");
|
||||
$("#radio-btn").addClass("teal-text");
|
||||
$("#radio-sta").html("<br>Now Playing:"+name);
|
||||
}
|
||||
function Rstop(){
|
||||
$("#radio").attr("src","");
|
||||
r.pause();
|
||||
$("#radio").removeClass("play");
|
||||
$("#radio-btn").removeClass("teal-text");
|
||||
$("#radio-sta").html("");
|
||||
}
|
||||
function Ryourself(){
|
||||
$("#radio-input").removeClass("hide");
|
||||
$("#radio-view").addClass("hide");
|
||||
}
|
||||
function Rselect(){
|
||||
$("#radio-input").addClass("hide");
|
||||
$("#radio-view").removeClass("hide");
|
||||
}
|
||||
function Rinput(){
|
||||
var url=$("#radio-url").val();
|
||||
Rplay(url,url)
|
||||
}
|
|
@ -17,6 +17,12 @@ function scrollck() {
|
|||
jQuery("time.timeago").timeago();
|
||||
localStorage.removeItem("pool_" + tlid);
|
||||
}
|
||||
//自動リフレッシュ
|
||||
if( $("#timeline_" + tlid+" .cvo").length > 100 ){
|
||||
for(var i=100;i<$("#timeline_" + tlid +" .cvo").length;i++){
|
||||
$("#timeline_" + tlid +" .cvo").eq(i).remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
//続きを読むトリガー
|
||||
var scrt = $(this).find(".tl").height() - 1000;
|
||||
|
@ -28,5 +34,5 @@ function scrollck() {
|
|||
}
|
||||
|
||||
function goTop(id){
|
||||
$("#timeline_"+id+"_box .tl-box").scrollTop(0)
|
||||
$("#timeline_box_"+id+"_box .tl-box").scrollTop(0)
|
||||
}
|
Loading…
Reference in New Issue
Block a user