t(...o,this))}on(t,e){return"function"==typeof e&&"string"==typeof t&&t in this._eventListener&&this._eventListener[t].push(e),this}off(t,e){const o=this._eventListener[t];if(o){const t=o.indexOf(e);~t&&o.splice(t,1)}return this}addSwatch(t){const e=_(t).values;if(e){const t=this._swatchColors,o=this._root,n=w(...e),s=a(` `);return o.swatches.appendChild(s),t.push({element:s,hsvaColorObject:n}),this._eventBindings.push(i(s,"click",()=>{this.setHSVA(...n.toHSVA(),!0),this._emit("swatchselect",n)})),!0}return!1}removeSwatch(t){if("number"==typeof t){const e=this._swatchColors[t];if(e){const o=e.element;return this._root.swatches.removeChild(o),this._swatchColors.splice(t,1),!0}}return!1}applyColor(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const e=this._root,o=e.preview,n=e.button,i=this._color.toRGBA().toString();o.lastColor.style.color=i,this.options.useAsButton||(n.style.color=i),n.classList.remove("clear"),this._lastColor=this._color.clone(),this._initializingActive||t||this._emit("save",this._color)}destroy(){this._eventBindings.forEach(t=>s(...t)),Object.keys(this.components).forEach(t=>this.components[t].destroy())}destroyAndRemove(){this.destroy();const t=this._root.root;t.parentElement.removeChild(t)}hide(){return this._root.app.classList.remove("visible"),this}show(){if(!this.options.disabled)return this._root.app.classList.add("visible"),this._rePositioningPicker(),this}isOpen(){return this._root.app.classList.contains("visible")}setHSVA(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:360,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const s=this._recalc;if(this._recalc=!1,t<0||t>360||e<0||e>100||o<0||o>100||n<0||n>1)return!1;const r=this.components,a=r.hue,c=r.opacity,l=r.palette,p=a.options.wrapper.offsetHeight*(t/360);a.update(0,p);const h=c.options.wrapper.offsetHeight*n;c.update(0,h);const u=l.options.wrapper,d=u.offsetWidth*(e/100),f=u.offsetHeight*(1-o/100);return l.update(d,f),this._color=w(t,e,o,n),this._recalc=s,this._recalc&&this._updateOutput(),i||this.applyColor(),!0}setColor(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(null===t)return this._clearColor(),!0;const o=_(t),n=o.values,i=o.type;if(n){const t=i.toUpperCase(),o=this._root.interaction.options,s=o.find(e=>e.getAttribute("data-type")===t);if(!s.hidden)for(const t of o)t.classList[t===s?"add":"remove"]("active");return this.setHSVA(...n,e)}}setColorRepresentation(t){return t=t.toUpperCase(),!!this._root.interaction.options.find(e=>e.getAttribute("data-type")===t&&!e.click())}getColorRepresentation(){return this._representation}getColor(){return this._color}getRoot(){return this._root}disable(){return this.hide(),this.options.disabled=!0,this._root.button.classList.add("disabled"),this}enable(){return this.options.disabled=!1,this._root.button.classList.remove("disabled"),this}}C.utils={once:(t,e,o,n)=>i(t,e,function t(){o.apply(this,arguments),this.removeEventListener(e,t)},n),on:i,off:s,eventPath:p,createElementFromString:a,adjustableInputNumbers:h,removeAttribute:c,createFromTemplate:l},C.create=(t=>new C(t)),C.version="0.4.2";e.default=C}]).default});
+//# sourceMappingURL=pickr.min.js.map
\ No newline at end of file
diff --git a/app/js/post/bb-md.js b/app/js/post/bb-md.js
index abe94bad..75a88882 100644
--- a/app/js/post/bb-md.js
+++ b/app/js/post/bb-md.js
@@ -290,10 +290,10 @@ function preview(){
for(let l = 0; l < li.length; l++) {
var u=li[l].match(/^1\. (.+)$/);
var listUl=''+u[1]+' ';
- if(l == 0){
+ if(l === 0){
listUl=''+listUl;
}
- if(l==li.length-1){
+ if(l===li.length-1){
listUl=listUl+' ';
}
var bb=bb.replace(new RegExp(li[l], ""),listUl);
diff --git a/app/js/post/emoji.js b/app/js/post/emoji.js
index 85fc4629..c184b157 100644
--- a/app/js/post/emoji.js
+++ b/app/js/post/emoji.js
@@ -90,7 +90,7 @@ function emojiList(target) {
var page = Math.ceil(num / 126);
$("#emoji-sum").text(page);
var ct = Math.ceil(start / 126);
- if (ct == 0) {
+ if (ct === 0) {
var ct = 1;
$("#emoji-before").addClass("disabled");
} else {
diff --git a/app/js/post/img.js b/app/js/post/img.js
index 51310143..0dcd41d2 100644
--- a/app/js/post/img.js
+++ b/app/js/post/img.js
@@ -106,7 +106,7 @@ function media(b64, type, no) {
var start = "https://" + domain + "/api/drive/files/create";
httpreq.open('POST', start, true);
httpreq.upload.addEventListener("progress", progshow, false);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
if ($("#nsfw").hasClass("nsfw-avail")) {
var nsfw = true;
} else {
@@ -121,12 +121,12 @@ function media(b64, type, no) {
var start = "https://" + domain + "/api/v1/media";
httpreq.open('POST', start, true);
httpreq.upload.addEventListener("progress", progshow, false);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
httpreq.send(fd);
}
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
var img = localStorage.getItem("img");
diff --git a/app/js/post/misskeystatus.js b/app/js/post/misskeystatus.js
index 77b28b50..6724c2f6 100644
--- a/app/js/post/misskeystatus.js
+++ b/app/js/post/misskeystatus.js
@@ -1,7 +1,7 @@
//Renpost
function renote(id, acct_id, remote) {
if ($("#pub_" + id).hasClass("rted")) {
- return
+ return false;
}
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
@@ -12,10 +12,10 @@ function renote(id, acct_id, remote) {
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({i:at,renoteId:id}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
$("[toot-id=" + id + "]").addClass("rted");
@@ -58,10 +58,10 @@ function reactiontoggle(id,acct_id,tlid){
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({i:at,noteId:id}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if(json.reactionCounts){
@@ -158,10 +158,10 @@ function reaction(mode,id,acct_id,tlid){
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({i:at,noteId:id,reaction:mode}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
$(".fav_"+id).toggleClass("yellow-text");
}
}
@@ -177,7 +177,7 @@ function vote(acct_id,id,to){
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({i:at,noteId:id,choice:to}));
httpreq.onreadystatechange = function() {
voterefresh(acct_id,id)
diff --git a/app/js/post/post.js b/app/js/post/post.js
index e8ee6acc..61255f11 100644
--- a/app/js/post/post.js
+++ b/app/js/post/post.js
@@ -11,7 +11,7 @@ function sec(){
}
function post(mode,postvis) {
if($("#toot-post-btn").prop("disabled")){
- return
+ return false;
}
var str = $("#textarea").val();
var acct_id = $("#post-acct-sel").val();
@@ -57,13 +57,13 @@ function post(mode,postvis) {
buttons: [lang.lang_post_btn1,lang.lang_post_btn2, lang.lang_post_btn3]
}
dialog.showMessageBox(options, function(arg) {
- if(arg==1){
+ if(arg===1){
$("#cw-text").show();
$("#cw").addClass("yellow-text");
$("#cw").addClass("cw-avail");
$("#cw-text").val(plus);
post("pass");
- }else if(arg==2){
+ }else if(arg===2){
post("pass");
}
})
@@ -162,10 +162,10 @@ function post(mode,postvis) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify(toot));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
if(str.indexOf(localStorage.getItem("stable"))==-1){
localStorage.removeItem("stable")
}
@@ -234,10 +234,10 @@ function misskeyPost(){
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify(toot));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
if(str.indexOf(localStorage.getItem("stable"))==-1){
localStorage.removeItem("stable")
}
diff --git a/app/js/post/status.js b/app/js/post/status.js
index 13860500..43301ab9 100644
--- a/app/js/post/status.js
+++ b/app/js/post/status.js
@@ -13,10 +13,10 @@ function fav(id, acct_id, remote) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
if(remote!="remote"){
//APIのふぁぼカウントがおかしい
@@ -63,10 +63,10 @@ function rt(id, acct_id, remote) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if (remote != "remote") {
@@ -133,10 +133,10 @@ function follow(acct_id,remote) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify(ent));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if ($("#his-data").hasClass("following")) {
@@ -168,10 +168,10 @@ function block(acct_id) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
if ($("#his-data").hasClass("blocking")) {
$("#his-data").removeClass("blocking");
$("#his-block-btn").text(lang.lang_status_block);
@@ -210,10 +210,10 @@ function mute(acct_id) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(rq);
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
if ($("#his-data").hasClass("muting")) {
$("#his-data").removeClass("muting");
$("#his-mute-btn").text(lang.lang_status_mute);
@@ -234,7 +234,7 @@ function del(id, acct_id) {
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({i:at,noteId:id}));
}else{
var start = "https://" + domain + "/api/v1/statuses/" + id;
@@ -242,11 +242,11 @@ function del(id, acct_id) {
httpreq.open('DELETE', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
}
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
}
}
}
@@ -300,10 +300,10 @@ function pin(id, acct_id) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if ($("[toot-id=" + id + "]").hasClass("pined")) {
@@ -326,10 +326,10 @@ function request(id, flag, acct_id) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
showReq();
@@ -349,10 +349,10 @@ function domainblock(add, flag, acct_id) {
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
showDom();
@@ -406,10 +406,10 @@ function pinUser(){
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
if ($("#his-end-btn").hasClass("endorsed")) {
diff --git a/app/js/tl/card.js b/app/js/tl/card.js
index 4da9d56e..d9e981f3 100644
--- a/app/js/tl/card.js
+++ b/app/js/tl/card.js
@@ -83,7 +83,7 @@ function additional(acct_id, tlid) {
var xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.onreadystatechange = function()
{
- if( this.readyState == 4 && this.status == 200 ) {
+ if( this.readyState === 4 && this.status === 200 ) {
if( this.response){
var json=this.response;
var emojis=json.emojis;
diff --git a/app/js/tl/datails.js b/app/js/tl/datails.js
index eb4ec0bf..1252348c 100644
--- a/app/js/tl/datails.js
+++ b/app/js/tl/datails.js
@@ -78,10 +78,11 @@ function details(id, acct_id, tlid) {
$("#tootmodal").attr("data-user",scn);
}
context(id, acct_id);
+ var dom=null;
if(!local){
- var dom=scn.replace(/.+@/g,'');
+ dom=scn.replace(/.+@/g,'');
}else{
- var dom=domain;
+ dom=domain;
}
beforeToot(id, acct_id, dom);
userToot(id, acct_id, uid);
@@ -448,7 +449,7 @@ function shot(){
})
}
//翻訳
-function trans(tar){
+function trans(tar,to){
var html=$("#toot-this .toot").html();
if(html.match(/^(.+)<\/p>$/)){
html = html.match(/^
(.+)<\/p>$/)[1];
@@ -457,18 +458,21 @@ function trans(tar){
html = html.replace(/
/g, "\n");
html = html.replace(/<\/p>/g, "\n");
html=$.strip_tags(html);
+ if(~tar.indexOf("zh")){
+ tar="zh";
+ }
$("#toot-this .additional").text("Loading...(Powered by Google Translate)");
- var exec='https://script.google.com/macros/s/AKfycbz0ETqcUxwNlw961GjErNb7vr_X18N2s1AS5Xu5nFTbYXcdcRM/exec?text='+encodeURIComponent(html)+'&source='+tar+'&target=ja'
+ var exec='https://script.google.com/macros/s/AKfycbxhwW5tjjop9Irg-y1zr_WsXlCKEzwWG6KuoOt_vVRDfEbRv0c/exec?format=json&text='+encodeURIComponent(html)+'&source='+tar+'&target='+to
console.log(exec);
fetch(exec, {
method: 'GET',
}).then(function(response) {
- return response.text();
+ return response.json();
}).catch(function(error) {
todo(error);
console.error(error);
}).then(function(text) {
- $("#toot-this .additional").html(''+text+' ');
+ $("#toot-this .additional").html(''+text.text+' ');
});
}
//ブラウザで開く
diff --git a/app/js/tl/date.js b/app/js/tl/date.js
index 3ab4d752..505eb54d 100644
--- a/app/js/tl/date.js
+++ b/app/js/tl/date.js
@@ -15,10 +15,11 @@ function date(str, datetype) {
} else {
var min = date.getMinutes();
}
+ var sec=null;
if (date.getSeconds() < 10) {
- var sec = "0" + date.getSeconds();
+ sec = "0" + date.getSeconds();
} else {
- var sec = date.getSeconds();
+ sec = date.getSeconds();
}
if (datetype == "full") {
var ret = date.getFullYear() + "/" + month + "/" + date.getDate() + "/ " +
@@ -56,10 +57,11 @@ function date(str, datetype) {
//特殊フォーマット(インスタンス情報で利用)
function crat(str) {
var date = new Date(str);
+ var mnt=null;
if(date.getMonth()<9){
- var mnt="0"+(date.getMonth()+1);
+ mnt="0"+(date.getMonth()+1);
}else{
- var mnt=date.getMonth()+1;
+ mnt=date.getMonth()+1;
}
if(date.getDate()<10){
var dat="0"+date.getDate();
diff --git a/app/js/tl/dm.js b/app/js/tl/dm.js
index 38215ae2..8167bddd 100644
--- a/app/js/tl/dm.js
+++ b/app/js/tl/dm.js
@@ -32,9 +32,6 @@ function dmParse(obj, mix, acct_id, tlid, popup, mutefilter) {
console.log(obj);
var templete = '';
if(obj[0]){
- if(tlid==1){
- console.log("testalive:"+"lastunix_"+ tlid+":"+date(obj[0].created_at, 'unix'))
- }
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
}
diff --git a/app/js/tl/filter.js b/app/js/tl/filter.js
index 43542eed..bc20ee89 100644
--- a/app/js/tl/filter.js
+++ b/app/js/tl/filter.js
@@ -192,7 +192,7 @@ function makeNewFilter(){
httpreq.open(method, start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({
phrase: phr,
context: cont,
@@ -201,7 +201,7 @@ function makeNewFilter(){
expires_in:time
}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
filter();
filterUpdate(acct_id)
@@ -283,10 +283,10 @@ function filterDel(id,acct_id){
httpreq.open("DELETE", start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send();
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
filter();
filterUpdate(acct_id)
diff --git a/app/js/tl/list.js b/app/js/tl/list.js
index 428188bb..ae5d0747 100644
--- a/app/js/tl/list.js
+++ b/app/js/tl/list.js
@@ -56,12 +56,12 @@ function makeNewList(){
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({
title: text
}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
list();
$("#list-add").val("")
@@ -166,12 +166,12 @@ function listAdd(id,user,acct_id){
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({
account_ids: [user]
}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
hisList(user,acct_id)
}
@@ -186,12 +186,12 @@ function listRemove(id,user,acct_id){
httpreq.open('DELETE', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
httpreq.setRequestHeader('Authorization', 'Bearer ' + at);
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(JSON.stringify({
account_ids: [user]
}));
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
hisList(user,acct_id)
}
diff --git a/app/js/tl/notification.js b/app/js/tl/notification.js
index f018f4a9..736b3e19 100644
--- a/app/js/tl/notification.js
+++ b/app/js/tl/notification.js
@@ -39,10 +39,10 @@ function notfColumn(acct_id, tlid, sys){
var body="";
}
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(body);
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
var max_id = httpreq.getResponseHeader("link").match(/\?max_id=([0-9]+)/)[1];
if(json[0]){
@@ -391,10 +391,10 @@ function notfmore(tlid) {
var body="";
}
- httpreq.responseType = 'json';
+ httpreq.responseType = "json";
httpreq.send(body);
httpreq.onreadystatechange = function() {
- if (httpreq.readyState == 4) {
+ if (httpreq.readyState === 4) {
var json = httpreq.response;
console.log(json);
var max_id = httpreq.getResponseHeader("link").match(/\?max_id=([0-9]+)/)[1];
diff --git a/app/js/tl/parse.js b/app/js/tl/parse.js
index 12c7dc23..779f7003 100644
--- a/app/js/tl/parse.js
+++ b/app/js/tl/parse.js
@@ -2,7 +2,7 @@
function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
var templete = '';
if(obj[0]){
- if(tlid==1){
+ if(tlid===1){
console.log("testalive:"+"lastunix_"+ tlid+":"+date(obj[0].created_at, 'unix'))
}
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
@@ -84,7 +84,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
var card = localStorage.getItem("card_" + tlid);
if (!sent) {
- var sent = 500;
+ sent = 500;
}
if (!ltr) {
var ltr = 500;
@@ -614,8 +614,8 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
});
}
//日本語じゃない
- if(toot.language!="ja"){
- var trans='
';
+ if(toot.language!=lang.language && toot.language){
+ var trans='';
}else{
var trans="";
}
@@ -673,9 +673,14 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
}
var result_hide="hide";
}
+ if(toot.poll.expired){
+ var ended=lang.lang_parse_endedvote;
+ }else{
+ var ended=date(toot.poll.expires_at, datetype);
+ }
Object.keys(choices).forEach(function(keyc) {
var choice = choices[keyc];
- if(!toot.poll.voted){
+ if(!toot.poll.voted && !toot.poll.expired){
var votesel='voteSelMastodon(\''+acct_id+'\',\''+toot.poll.id+'\','+keyc+','+toot.poll.multiple+')';
var voteclass="pointer waves-effect waves-light";
}else{
@@ -686,7 +691,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter) {
});
poll=''+poll+myvote+' ' +
- date(toot.poll.expires_at, datetype) + '
';
+ ended+ '';
}
templete = templete + '
Languages
-
日本語(Japanese) /
English /
Crowdin web translate /
+
日本語(Japanese) /
English /
Crowdin web translate /
Import and export of preferences
Export
Import
-
Themes
-
-
Black
-
-
White
-
-
Indigo(エンドレスナイト)
-
-
Brown(ビタースイート・タイム)
-
-
Green(ユースフルロマンス)
Popup notification(on Windows) Hide to set "0"
@@ -88,6 +81,72 @@
+
+
+
Select theme
+
+
Black
+
+
White
+
+
Indigo(エンドレスナイト)
+
+
Brown(ビタースイート・タイム)
+
+
Green(ユースフルロマンス)
+
+
Custom
+
+
+
+
Edit and add custom themes
+
+
+ Add new
+
+
+
Name
+
+
About this theme
+
+
Color scheme
+
+
Dark
+
+
Light
+
+
+
Primary Background color
+
+
+
+
+
Secondary Background of components
+
+
+
+
+
+
Accent Background of boosts
+
+
+
+
+
Change
+
+ Share this code with other TheDesk and Misskey.
+
Import of custom themes
+ {{cImpWarn}}
+
+
Import
+
+
@@ -322,7 +381,7 @@
Spotify and NowPlaying Preferences
- h5>NowPlaying Provider(Windows)
+
NowPlaying Provider(Windows)
macOS and Linux are not supported. AIMP and iTunes were checked by developer.
CAD:foobar2000, MusicBee,J. River Media Center, Media Jukebox
WLM:Last.fm Client, TTPlayer, OpenPandora, Zune.
For foobar2000,
foo_cad plugin is required. And MusicBee requires CAD.
AIMP
@@ -337,7 +396,7 @@
WLM
-
CAD
+ CAD
Click music_note icon to NowPlaying
Account Connection
TheDesk save your data on thedesk.top server.
@@ -443,6 +502,7 @@ TheDeskおよびCutls Pは被災地支援のため
+
\ No newline at end of file
diff --git a/app/view/ja/index.html b/app/view/ja/index.html
index 8860d5a0..fd02e2af 100644
--- a/app/view/ja/index.html
+++ b/app/view/ja/index.html
@@ -32,7 +32,7 @@
+
+
設定
言語
-
日本語(Japanese) /
English /
Crowdin web translate /
+
日本語(Japanese) /
English /
Crowdin web translate /
設定のインポートとエクスポート
エクスポート
インポート
-
テーマの設定
-
-
Black
-
-
White
-
-
Indigo(エンドレスナイト)
-
-
Brown(ビタースイート・タイム)
-
-
Green(ユースフルロマンス)
新規通知のポップアップお知らせの表示秒数 0に設定すると表示されません
@@ -88,6 +81,72 @@
+
+
+
テーマの選択
+
+
Black
+
+
White
+
+
Indigo(エンドレスナイト)
+
+
Brown(ビタースイート・タイム)
+
+
Green(ユースフルロマンス)
+
+
Custom
+
+
+
+
カスタムテーマの作成・編集
+
+
+ 新規作成
+
+
+
名前
+
+
説明
+
+
色の系統
+
+
Dark
+
+
Light
+
+
+
+
Secondary 補助要素に使われる背景色
+
+
+
+
+
+
+
変更
+
+ このコードは他のTheDeskなどとシェアできます。このコードをMiASに貼ることはご遠慮ください。
+
カスタムテーマのインポート
+
MiAS 上の80を超えるテーマを張り付けることもできます。
+
+
インポート
+
+
@@ -322,7 +381,7 @@
SpotifyとNowPlayingの設定
- h5>NowPlayingのソース(Windows)
+
NowPlayingのソース(Windows)
macOSやLinuxでは動作しません。AIMPとiTunes以外未検証です。
foobar2000, MusicBee,J. River Media Center, Media JukeboxはCADを、Last.fm Client, TTPlayer, OpenPandora, ZuneはWLMを選んでください。
ただし、foobar2000は
foo_cad plugin が必要です。MusicBeeもCADを有効にする必要があります。
AIMP
@@ -337,7 +396,7 @@
WLM
-
CAD
+ CAD
music_note ボタンから簡単にNowPlayingができます。
アカウントの連携
APIの性質上,thedesk.topへアクセスします。
@@ -443,6 +502,7 @@ TheDeskおよびCutls Pは被災地支援のため
+
\ No newline at end of file
diff --git a/app/view/make/language/setting.en.json b/app/view/make/language/setting.en.json
index 02b382e4..534068c4 100644
--- a/app/view/make/language/setting.en.json
+++ b/app/view/make/language/setting.en.json
@@ -28,6 +28,18 @@
"savefolder":"Folder to save",
"savefolderwarn":"TheDesk uses this value when it try to save pictures or take screenshots.",
"absolute":"absolute value",
+ "themeSel":"Select theme",
+ "customtheme":"Edit and add custom themes",
+ "customthemeDirection":"Color scheme",
+ "primary":"Background color",
+ "secondarycolor":"Background of components",
+ "text":"Text color",
+ "accent":"Background of boosts",
+ "add_new":"Add new",
+ "name":"Name",
+ "desc":"About this theme",
+ "customShare":"Share this code with other TheDesk and Misskey.",
+ "customImport":"Import of custom themes",
"timeline":"Timeline Preferences",
"timemode":"Time format",
"relativetime":"Relative format:\"1 minutes ago\",\"3 days ago\"",
diff --git a/app/view/make/language/setting.ja.json b/app/view/make/language/setting.ja.json
index 90f819ef..c539ace5 100644
--- a/app/view/make/language/setting.ja.json
+++ b/app/view/make/language/setting.ja.json
@@ -28,6 +28,19 @@
"savefolder":"デフォルトの保存先",
"savefolderwarn":"画像ダウンロードやスクリーンショットに影響します。",
"absolute":"絶対指定",
+ "themeSel":"テーマの選択",
+ "customtheme":"カスタムテーマの作成・編集",
+ "customthemeDirection":"色の系統",
+ "primary":"全体の背景色など",
+ "secondarycolor":"補助要素に使われる背景色",
+ "text":"テキストの色",
+ "accent":"ブーストの背景色など",
+ "add_new":"新規作成",
+ "name":"名前",
+ "desc":"説明",
+ "customShare":"このコードは他のTheDeskなどとシェアできます。このコードをMiASに貼ることはご遠慮ください。",
+ "customImport":"カスタムテーマのインポート",
+ "cImpWarn":" MiAS 上の80を超えるテーマを張り付けることもできます。",
"timeline":"タイムラインの設定",
"timemode":"時間表記設定",
"relativetime":"相対時間の例:\"1分前\",\"3日前\"",
diff --git a/app/view/make/setting.sample.html b/app/view/make/setting.sample.html
index af3de7d8..a19bb63d 100644
--- a/app/view/make/setting.sample.html
+++ b/app/view/make/setting.sample.html
@@ -12,16 +12,20 @@
+
+
+
+
{{setting}}
+
+
+
{{themeSel}}
+
+
Black
+
+
White
+
+
Indigo(エンドレスナイト)
+
+
Brown(ビタースイート・タイム)
+
+
Green(ユースフルロマンス)
+
+
Custom
+
+
+
+
{{customtheme}}
+
+
+ {{add_new}}
+
+
+
{{name}}
+
+
{{desc}}
+
+
{{customthemeDirection}}
+
+
Dark
+
+
Light
+
+
+
Primary {{primary}}
+
+
+
+
+
Secondary {{secondarycolor}}
+
+
+
+
+
+
+
{{change}}
+
+ {{customShare}}
+
{{customImport}}
+ {{cImpWarn}}
+
+
{{import}}
+
+
@@ -322,7 +381,7 @@
{{spotify}}
crwdns530:0crwdne530:0
-
日本語(Japanese) /
English /
Crowdin web translate /
+
日本語(Japanese) /
English /
Crowdin web translate /
crwdns531:0crwdne531:0
crwdns533:0crwdne533:0
crwdns532:0crwdne532:0
-
crwdns534:0crwdne534:0
-
-
Black
-
-
White
-
-
Indigo(エンドレスナイト)
-
-
Brown(ビタースイート・タイム)
-
-
Green(ユースフルロマンス)
crwdns1898:0crwdne1898:0 crwdns536:0crwdne536:0
@@ -88,6 +81,72 @@
+
+
+
{{themeSel}}
+
+
Black
+
+
White
+
+
Indigo(エンドレスナイト)
+
+
Brown(ビタースイート・タイム)
+
+
Green(ユースフルロマンス)
+
+
Custom
+
+
+
+
{{customtheme}}
+
+
+ {{add_new}}
+
+
+
{{name}}
+
+
{{desc}}
+
+
{{customthemeDirection}}
+
+
Dark
+
+
Light
+
+
+
Primary {{primary}}
+
+
+
+
+
Secondary {{secondarycolor}}
+
+
+
+
+
+
+
crwdns528:0crwdne528:0
+
+ {{customShare}}
+
{{customImport}}
+ {{cImpWarn}}
+
+
crwdns532:0crwdne532:0
+
+
@@ -322,7 +381,7 @@
crwdns624:0crwdne624:0