Debug
This commit is contained in:
parent
3cde6d0bff
commit
d3ff1aa17a
|
@ -99,8 +99,6 @@ a,button{
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var remote=electron.remote;
|
var remote=electron.remote;
|
||||||
const shell=electron.shell;
|
const shell=electron.shell;
|
||||||
//JSON.parse(fs.readFileSync(info_path, 'utf8'));
|
|
||||||
console.log(process.versions);
|
|
||||||
$("#node").text(process.version);
|
$("#node").text(process.version);
|
||||||
$("#chrome").text(process.versions.chrome);
|
$("#chrome").text(process.versions.chrome);
|
||||||
$("#electron").text(process.versions.electron);
|
$("#electron").text(process.versions.electron);
|
||||||
|
|
|
@ -190,7 +190,6 @@ function launchEditor(id, src) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function editPhoto() {
|
function editPhoto() {
|
||||||
//console.log(this);
|
|
||||||
var id = this.getAttribute("id");
|
var id = this.getAttribute("id");
|
||||||
var src = this.getAttribute("src");
|
var src = this.getAttribute("src");
|
||||||
launchEditor(id, src);
|
launchEditor(id, src);
|
||||||
|
|
|
@ -392,7 +392,13 @@ blockquote:before, .quote:before {
|
||||||
padding:4px;
|
padding:4px;
|
||||||
}
|
}
|
||||||
#something-wrong{
|
#something-wrong{
|
||||||
width:100%; height:100%; position:absolute; display:flex; justify-content: center; align-items:center
|
flex-direction: column;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
position:absolute;
|
||||||
|
display:flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items:center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*スクロールバー*/
|
/*スクロールバー*/
|
||||||
|
|
BIN
app/img/thinkingdesk.png
Normal file
BIN
app/img/thinkingdesk.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
|
@ -1,9 +1,9 @@
|
||||||
//バージョンチェッカー
|
//バージョンチェッカー
|
||||||
function verck(ver) {
|
function verck(ver) {
|
||||||
console.log("Welcome")
|
console.log("%c Welcome😊", "color: red;font-size:200%;")
|
||||||
if(localStorage.getItem("ver")!=ver){
|
if(localStorage.getItem("ver")!=ver){
|
||||||
localStorage.setItem("ver", ver);
|
localStorage.setItem("ver", ver);
|
||||||
console.log("Thank you for your update");
|
console.log("%c Thank you for your update🎉", "color: red;font-size:200%;");
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
$('#releasenote').modal('open');
|
$('#releasenote').modal('open');
|
||||||
verp=ver.replace( '(', '');
|
verp=ver.replace( '(', '');
|
||||||
|
@ -13,7 +13,7 @@ function verck(ver) {
|
||||||
verp=verp.replace( ']', '');
|
verp=verp.replace( ']', '');
|
||||||
verp=verp.replace( ')', '');
|
verp=verp.replace( ')', '');
|
||||||
verp=verp.replace( ' ', '_');
|
verp=verp.replace( ' ', '_');
|
||||||
console.log(verp);
|
console.log("%c "+verp, "color: red;font-size:200%;");
|
||||||
if(lang.language=="ja"){
|
if(lang.language=="ja"){
|
||||||
$("#release-"+verp).show();
|
$("#release-"+verp).show();
|
||||||
}else{
|
}else{
|
||||||
|
@ -106,7 +106,7 @@ function verck(ver) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(mess) {
|
}).then(function(mess) {
|
||||||
console.log(mess);
|
console.table(mess);
|
||||||
if (mess) {
|
if (mess) {
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var remote=electron.remote;
|
var remote=electron.remote;
|
||||||
|
@ -128,7 +128,7 @@ function verck(ver) {
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
ipc.send('update', "true");
|
ipc.send('update', "true");
|
||||||
}else{
|
}else{
|
||||||
console.log(lang.lang_version_skipver);
|
console.warn(lang.lang_version_skipver);
|
||||||
todo(lang.lang_version_skipver);
|
todo(lang.lang_version_skipver);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
|
@ -141,9 +141,7 @@ function verck(ver) {
|
||||||
if(!localStorage.getItem("last-notice-id")){
|
if(!localStorage.getItem("last-notice-id")){
|
||||||
localStorage.setItem("last-notice-id",0)
|
localStorage.setItem("last-notice-id",0)
|
||||||
}
|
}
|
||||||
console.log(localStorage.getItem("last-notice-id"))
|
|
||||||
var start = "https://thedesk.top/notice?since_id="+localStorage.getItem("last-notice-id");
|
var start = "https://thedesk.top/notice?since_id="+localStorage.getItem("last-notice-id");
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET'
|
method: 'GET'
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
|
@ -152,7 +150,6 @@ function verck(ver) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(mess) {
|
}).then(function(mess) {
|
||||||
console.log(mess.length);
|
|
||||||
if(mess.length<1){
|
if(mess.length<1){
|
||||||
return false;
|
return false;
|
||||||
}else{
|
}else{
|
||||||
|
@ -202,13 +199,11 @@ var infostreaming=false;
|
||||||
function infowebsocket(){
|
function infowebsocket(){
|
||||||
infows = new WebSocket("wss://thedesk.top/ws/");
|
infows = new WebSocket("wss://thedesk.top/ws/");
|
||||||
infows.onopen = function(mess) {
|
infows.onopen = function(mess) {
|
||||||
console.log(tlid + ":Connect Streaming Info:");
|
console.log([tlid,":Connect Streaming Info:",mess]);
|
||||||
console.log(mess);
|
|
||||||
infostreaming=true;
|
infostreaming=true;
|
||||||
}
|
}
|
||||||
infows.onmessage = function(mess) {
|
infows.onmessage = function(mess) {
|
||||||
console.log(":Receive Streaming:");
|
console.log([tlid,":Receive Streaming:",JSON.parse(mess.data)]);
|
||||||
console.log(JSON.parse(mess.data));
|
|
||||||
var obj=JSON.parse(mess.data);
|
var obj=JSON.parse(mess.data);
|
||||||
if(obj.type!="counter"){
|
if(obj.type!="counter"){
|
||||||
localStorage.setItem("last-notice-id",obj.id)
|
localStorage.setItem("last-notice-id",obj.id)
|
||||||
|
@ -258,7 +253,22 @@ function infowebsocket(){
|
||||||
}
|
}
|
||||||
setInterval(function(){
|
setInterval(function(){
|
||||||
if(!infostreaming){
|
if(!infostreaming){
|
||||||
console.log("try to connect")
|
console.log("try to connect to base-streaming")
|
||||||
infowebsocket();
|
infowebsocket();
|
||||||
}
|
}
|
||||||
}, 10000);
|
}, 10000);
|
||||||
|
function openRN(){
|
||||||
|
$('#releasenote').modal('open');
|
||||||
|
if(lang.language=="ja"){
|
||||||
|
verp=ver.replace( '(', '');
|
||||||
|
verp=verp.replace( '.', '-');
|
||||||
|
verp=verp.replace( '.', '-');
|
||||||
|
verp=verp.replace( '[', '-');
|
||||||
|
verp=verp.replace( ']', '');
|
||||||
|
verp=verp.replace( ')', '');
|
||||||
|
verp=verp.replace( ' ', '_');
|
||||||
|
$("#release-"+verp).show();
|
||||||
|
}else{
|
||||||
|
$("#release-en").show();
|
||||||
|
}
|
||||||
|
}
|
|
@ -42,7 +42,6 @@ function defaultEmoji(target){
|
||||||
});
|
});
|
||||||
$("#emoji-list").html(emojis);
|
$("#emoji-list").html(emojis);
|
||||||
$("#now-emoji").text(lang.lang_defaultemojis_text.replace("{{cat}}" ,defaultemojiname[target]));
|
$("#now-emoji").text(lang.lang_defaultemojis_text.replace("{{cat}}" ,defaultemojiname[target]));
|
||||||
console.log(target);
|
|
||||||
$(".emoji-control").addClass("hide");
|
$(".emoji-control").addClass("hide");
|
||||||
}
|
}
|
||||||
function customEmoji(){
|
function customEmoji(){
|
||||||
|
@ -60,7 +59,6 @@ function defEmoji(target){
|
||||||
}else{
|
}else{
|
||||||
emoji=twemoji.convert.fromCodePoint(hex[0]);
|
emoji=twemoji.convert.fromCodePoint(hex[0]);
|
||||||
}
|
}
|
||||||
console.log(emoji)
|
|
||||||
var now = $("#textarea").val();
|
var now = $("#textarea").val();
|
||||||
var selin = localStorage.getItem("cursor");
|
var selin = localStorage.getItem("cursor");
|
||||||
var now = $("#textarea").val();
|
var now = $("#textarea").val();
|
||||||
|
@ -71,7 +69,6 @@ function defEmoji(target){
|
||||||
}else{
|
}else{
|
||||||
newt = emoji+now;
|
newt = emoji+now;
|
||||||
}
|
}
|
||||||
console.log(emoji);
|
|
||||||
$("#textarea").val(newt);
|
$("#textarea").val(newt);
|
||||||
$("#textarea").focus();
|
$("#textarea").focus();
|
||||||
var selin = $("#textarea").prop('selectionStart');
|
var selin = $("#textarea").prop('selectionStart');
|
||||||
|
@ -82,7 +79,6 @@ function defEmoji(target){
|
||||||
}
|
}
|
||||||
function faicon(){
|
function faicon(){
|
||||||
var json=faicons;
|
var json=faicons;
|
||||||
console.log(json);
|
|
||||||
var emojis="";
|
var emojis="";
|
||||||
Object.keys(json).forEach(function(key) {
|
Object.keys(json).forEach(function(key) {
|
||||||
var emoji = json[key];
|
var emoji = json[key];
|
||||||
|
|
|
@ -40,6 +40,7 @@ if (obj[0].domain) {
|
||||||
ticker();
|
ticker();
|
||||||
multiSelector();
|
multiSelector();
|
||||||
verck(ver);
|
verck(ver);
|
||||||
|
$("#something-wrong img").attr("src","../../img/thinkingdesk.png")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -68,7 +69,6 @@ function login(url) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
|
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
|
||||||
"client_id"] + "&client_secret=" + json["client_secret"] +
|
"client_id"] + "&client_secret=" + json["client_secret"] +
|
||||||
"&response_type=code&redirect_uri="+red+"&scope=read+write+follow";
|
"&response_type=code&redirect_uri="+red+"&scope=read+write+follow";
|
||||||
|
@ -162,7 +162,6 @@ function getdata() {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error("Error:" + json.error);
|
console.error("Error:" + json.error);
|
||||||
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
||||||
|
@ -184,7 +183,6 @@ function getdata() {
|
||||||
vis: json["source"]["privacy"]
|
vis: json["source"]["privacy"]
|
||||||
}];
|
}];
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
console.log(obj);
|
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
localStorage.setItem("name_" + acct_id, json["display_name"]);
|
localStorage.setItem("name_" + acct_id, json["display_name"]);
|
||||||
localStorage.setItem("user_" + acct_id, json["acct"]);
|
localStorage.setItem("user_" + acct_id, json["acct"]);
|
||||||
|
@ -212,7 +210,6 @@ function getdataAdv(domain, at) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error("Error:" + json.error);
|
console.error("Error:" + json.error);
|
||||||
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
||||||
|
@ -246,7 +243,6 @@ function getdataAdv(domain, at) {
|
||||||
localStorage.setItem("user_" + target, json["acct"]);
|
localStorage.setItem("user_" + target, json["acct"]);
|
||||||
localStorage.setItem("user-id_" + target, json["id"]);
|
localStorage.setItem("user-id_" + target, json["id"]);
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
location.href="index.html";
|
location.href="index.html";
|
||||||
|
@ -261,7 +257,6 @@ function refresh(target,loadskip) {
|
||||||
}
|
}
|
||||||
var start = "https://" + obj[target].domain +
|
var start = "https://" + obj[target].domain +
|
||||||
"/api/v1/accounts/verify_credentials";
|
"/api/v1/accounts/verify_credentials";
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -274,7 +269,6 @@ function refresh(target,loadskip) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error("Error:" + json.error);
|
console.error("Error:" + json.error);
|
||||||
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
||||||
|
@ -298,8 +292,6 @@ function refresh(target,loadskip) {
|
||||||
localStorage.setItem("name_" + target, json["display_name"]);
|
localStorage.setItem("name_" + target, json["display_name"]);
|
||||||
localStorage.setItem("user_" + target, json["acct"]);
|
localStorage.setItem("user_" + target, json["acct"]);
|
||||||
localStorage.setItem("user-id_" + target, json["id"]);
|
localStorage.setItem("user-id_" + target, json["id"]);
|
||||||
console.log("user-id_" + target+":"+json["id"])
|
|
||||||
console.log(localStorage.getItem("user-id_"+target));
|
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
localStorage.setItem("follow_" + target, json["following_count"]);
|
localStorage.setItem("follow_" + target, json["following_count"]);
|
||||||
obj[target] = ref;
|
obj[target] = ref;
|
||||||
|
@ -359,7 +351,6 @@ function ckdb(acct_id) {
|
||||||
localStorage.removeItem("bb_" + acct_id);
|
localStorage.removeItem("bb_" + acct_id);
|
||||||
}
|
}
|
||||||
if(json[domain + "_home"]){
|
if(json[domain + "_home"]){
|
||||||
console.log("unique name:"+json[domain + "_home"]);
|
|
||||||
localStorage.setItem("home_" + acct_id, json[domain + "_home"]);
|
localStorage.setItem("home_" + acct_id, json[domain + "_home"]);
|
||||||
}
|
}
|
||||||
if(json[domain + "_local"]){
|
if(json[domain + "_local"]){
|
||||||
|
@ -396,8 +387,8 @@ function ckdb(acct_id) {
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
|
console.error(json.error);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(json){
|
if(json){
|
||||||
|
@ -461,12 +452,10 @@ function multiSelector() {
|
||||||
}
|
}
|
||||||
var profimg = acct.prof;
|
var profimg = acct.prof;
|
||||||
localStorage.setItem("prof_" + key, profimg);
|
localStorage.setItem("prof_" + key, profimg);
|
||||||
console.log(profimg);
|
|
||||||
if(!profimg){
|
if(!profimg){
|
||||||
profimg="../../img/missing.svg";
|
profimg="../../img/missing.svg";
|
||||||
}
|
}
|
||||||
$("#acct-sel-prof").attr("src",profimg);
|
$("#acct-sel-prof").attr("src",profimg);
|
||||||
console.log(domain);
|
|
||||||
if(domain){
|
if(domain){
|
||||||
var cc="("+domain+")";
|
var cc="("+domain+")";
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -32,7 +32,7 @@ function load() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(obj);
|
console.table(obj);
|
||||||
var templete;
|
var templete;
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var acct = obj[key];
|
var acct = obj[key];
|
||||||
|
@ -99,7 +99,6 @@ function data(domain) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (!json.error) {
|
if (!json.error) {
|
||||||
$("#ins-name").text(json.name);
|
$("#ins-name").text(json.name);
|
||||||
$("#ins-upd").text(date(json.checked_at, 'full'));
|
$("#ins-upd").text(date(json.checked_at, 'full'));
|
||||||
|
@ -110,6 +109,8 @@ function data(domain) {
|
||||||
$("#ins-per").text(json.uptime * 100);
|
$("#ins-per").text(json.uptime * 100);
|
||||||
$("#ins-user").text(json.users);
|
$("#ins-user").text(json.users);
|
||||||
$("#ins-ver").text(json.version);
|
$("#ins-ver").text(json.version);
|
||||||
|
}else{
|
||||||
|
console.error(json.error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var start = "https://" + domain +"/api/v1/instance";
|
var start = "https://" + domain +"/api/v1/instance";
|
||||||
|
@ -124,7 +125,6 @@ function data(domain) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (!json.error) {
|
if (!json.error) {
|
||||||
$("#ins-title").text(json.title);
|
$("#ins-title").text(json.title);
|
||||||
$("#ins-desc").html(json.description);
|
$("#ins-desc").html(json.description);
|
||||||
|
@ -135,6 +135,8 @@ function data(domain) {
|
||||||
$("#ins-prof").attr('src', json.thumbnail);
|
$("#ins-prof").attr('src', json.thumbnail);
|
||||||
$("#ins-admin").text(escapeHTML(json.contact_account.display_name)+"("+json.contact_account.acct+")");
|
$("#ins-admin").text(escapeHTML(json.contact_account.display_name)+"("+json.contact_account.acct+")");
|
||||||
$("#ins-admin").attr("href","index.html?mode=user&code="+json.contact_account.username+"@"+domain);
|
$("#ins-admin").attr("href","index.html?mode=user&code="+json.contact_account.username+"@"+domain);
|
||||||
|
}else{
|
||||||
|
console.error(json.error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -150,7 +152,6 @@ function multiDel(target) {
|
||||||
//公開範囲(差分のみ)
|
//公開範囲(差分のみ)
|
||||||
if(key>=target){
|
if(key>=target){
|
||||||
var oldvis=localStorage.getItem("vis-memory-"+key);
|
var oldvis=localStorage.getItem("vis-memory-"+key);
|
||||||
console.log(oldvis);
|
|
||||||
if(oldvis){
|
if(oldvis){
|
||||||
localStorage.setItem("vis-memory-"+nk,oldvis);
|
localStorage.setItem("vis-memory-"+nk,oldvis);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +176,6 @@ function multiDel(target) {
|
||||||
});
|
});
|
||||||
//とりあえず消す
|
//とりあえず消す
|
||||||
obj.splice(target, 1);
|
obj.splice(target, 1);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
load();
|
load();
|
||||||
|
@ -216,7 +216,6 @@ function multiDel2(target) {
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
if(key>=target){
|
if(key>=target){
|
||||||
var oldvis=localStorage.getItem("vis-memory-"+key);
|
var oldvis=localStorage.getItem("vis-memory-"+key);
|
||||||
console.log(oldvis);
|
|
||||||
if(oldvis){
|
if(oldvis){
|
||||||
var nk=key-1;
|
var nk=key-1;
|
||||||
localStorage.setItem("vis-memory-"+nk,oldvis);
|
localStorage.setItem("vis-memory-"+nk,oldvis);
|
||||||
|
@ -287,7 +286,6 @@ function login(url) {
|
||||||
}else{
|
}else{
|
||||||
var red = 'thedesk://manager';
|
var red = 'thedesk://manager';
|
||||||
}
|
}
|
||||||
console.log(red);
|
|
||||||
localStorage.setItem("redirect", red);
|
localStorage.setItem("redirect", red);
|
||||||
var start = "https://" + url + "/api/v1/apps";
|
var start = "https://" + url + "/api/v1/apps";
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
|
@ -303,7 +301,6 @@ function login(url) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
localStorage.setItem("msky","false");
|
localStorage.setItem("msky","false");
|
||||||
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
|
var auth = "https://" + url + "/oauth/authorize?client_id=" + json[
|
||||||
"client_id"] + "&client_secret=" + json["client_secret"] +
|
"client_id"] + "&client_secret=" + json["client_secret"] +
|
||||||
|
@ -389,7 +386,6 @@ function misskeyLogin(url) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
misskeyAuth(url, json.secret)
|
misskeyAuth(url, json.secret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -411,7 +407,6 @@ function misskeyAuth(url, mkc){
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
const {
|
const {
|
||||||
shell
|
shell
|
||||||
} = require('electron');
|
} = require('electron');
|
||||||
|
@ -445,7 +440,6 @@ function code(code) {
|
||||||
}
|
}
|
||||||
var url = localStorage.getItem("domain_tmp");
|
var url = localStorage.getItem("domain_tmp");
|
||||||
localStorage.removeItem("domain_tmp");
|
localStorage.removeItem("domain_tmp");
|
||||||
console.log(localStorage.getItem("msky"));
|
|
||||||
if(localStorage.getItem("msky")=="true"){
|
if(localStorage.getItem("msky")=="true"){
|
||||||
var start = "https://"+url+"/api/auth/session/userkey";
|
var start = "https://"+url+"/api/auth/session/userkey";
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
|
@ -460,7 +454,6 @@ function code(code) {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
var i = sha256(json.accessToken + localStorage.getItem("mkc"));
|
var i = sha256(json.accessToken + localStorage.getItem("mkc"));
|
||||||
console.log(json);
|
|
||||||
var avatar=json["user"]["avatarUrl"];
|
var avatar=json["user"]["avatarUrl"];
|
||||||
var priv="public";
|
var priv="public";
|
||||||
var add = {
|
var add = {
|
||||||
|
@ -482,7 +475,6 @@ function code(code) {
|
||||||
localStorage.setItem("user_" + target, json["user"]["username"]);
|
localStorage.setItem("user_" + target, json["user"]["username"]);
|
||||||
localStorage.setItem("user-id_" + target, json["user"]["id"]);
|
localStorage.setItem("user-id_" + target, json["user"]["id"]);
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
if($("body").hasClass("first")){
|
if($("body").hasClass("first")){
|
||||||
|
@ -511,7 +503,6 @@ function code(code) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
if (json["access_token"]) {
|
if (json["access_token"]) {
|
||||||
$("#auth").hide();
|
$("#auth").hide();
|
||||||
$("#add").show();
|
$("#add").show();
|
||||||
|
@ -537,7 +528,6 @@ function getdata(domain, at) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error("Error:" + json.error);
|
console.error("Error:" + json.error);
|
||||||
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + escapeHTML(json.error),
|
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + escapeHTML(json.error),
|
||||||
|
@ -572,7 +562,6 @@ function getdata(domain, at) {
|
||||||
localStorage.setItem("user_" + target, json["acct"]);
|
localStorage.setItem("user_" + target, json["acct"]);
|
||||||
localStorage.setItem("user-id_" + target, json["id"]);
|
localStorage.setItem("user-id_" + target, json["id"]);
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
if($("body").hasClass("first")){
|
if($("body").hasClass("first")){
|
||||||
|
@ -592,7 +581,6 @@ function refresh(target) {
|
||||||
}
|
}
|
||||||
var start = "https://" + obj[target].domain +
|
var start = "https://" + obj[target].domain +
|
||||||
"/api/v1/accounts/verify_credentials";
|
"/api/v1/accounts/verify_credentials";
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -605,7 +593,6 @@ function refresh(target) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json.error) {
|
if (json.error) {
|
||||||
console.error("Error:" + json.error);
|
console.error("Error:" + json.error);
|
||||||
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
Materialize.toast(lang.lang_fatalerroroccured+"Error:" + json.error,
|
||||||
|
@ -629,8 +616,6 @@ function refresh(target) {
|
||||||
localStorage.setItem("name_" + target, json["display_name"]);
|
localStorage.setItem("name_" + target, json["display_name"]);
|
||||||
localStorage.setItem("user_" + target, json["acct"]);
|
localStorage.setItem("user_" + target, json["acct"]);
|
||||||
localStorage.setItem("user-id_" + target, json["id"]);
|
localStorage.setItem("user-id_" + target, json["id"]);
|
||||||
console.log("user-id_" + target+":"+json["id"])
|
|
||||||
console.log(localStorage.getItem("user-id_"+target));
|
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
obj[target] = ref;
|
obj[target] = ref;
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
|
@ -652,7 +637,6 @@ function misskeyRefresh(obj,target,url){
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
return;
|
return;
|
||||||
var avatar=json["user"]["avatarURL"];
|
var avatar=json["user"]["avatarURL"];
|
||||||
var priv="public";
|
var priv="public";
|
||||||
|
@ -673,7 +657,6 @@ function misskeyRefresh(obj,target,url){
|
||||||
localStorage.setItem("user_" + target, json["user"]["username"]);
|
localStorage.setItem("user_" + target, json["user"]["username"]);
|
||||||
localStorage.setItem("user-id_" + target, json["user"]["id"]);
|
localStorage.setItem("user-id_" + target, json["user"]["id"]);
|
||||||
localStorage.setItem("prof_" + target, avatar);
|
localStorage.setItem("prof_" + target, avatar);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("multi", json);
|
localStorage.setItem("multi", json);
|
||||||
load();
|
load();
|
||||||
|
@ -694,7 +677,6 @@ function multisel() {
|
||||||
var templete;
|
var templete;
|
||||||
var last = localStorage.getItem("main");
|
var last = localStorage.getItem("main");
|
||||||
var sel;
|
var sel;
|
||||||
console.log(obj.length)
|
|
||||||
if(obj.length<1){
|
if(obj.length<1){
|
||||||
$("#src-acct-sel").html('<option value="tootsearch">Tootsearch</option>');
|
$("#src-acct-sel").html('<option value="tootsearch">Tootsearch</option>');
|
||||||
$("#add-acct-sel").html('<option value="noauth">'+lang.lang_login_noauth+'</option>');
|
$("#add-acct-sel").html('<option value="noauth">'+lang.lang_login_noauth+'</option>');
|
||||||
|
@ -808,9 +790,7 @@ input.addEventListener("focus", function() {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (!json.error) {
|
if (!json.error) {
|
||||||
|
|
||||||
var urls = "Suggest:";
|
var urls = "Suggest:";
|
||||||
Object.keys(json.instances).forEach(function(key) {
|
Object.keys(json.instances).forEach(function(key) {
|
||||||
var url = json.instances[key];
|
var url = json.instances[key];
|
||||||
|
@ -818,6 +798,8 @@ input.addEventListener("focus", function() {
|
||||||
'\')" class="pointer">' +escapeHTML(url.name) + '</a> ';
|
'\')" class="pointer">' +escapeHTML(url.name) + '</a> ';
|
||||||
});
|
});
|
||||||
$("#ins-suggest").html(urls);
|
$("#ins-suggest").html(urls);
|
||||||
|
}else{
|
||||||
|
console.error(json.error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@
|
||||||
ats = url.match(
|
ats = url.match(
|
||||||
/https:\/\/([-a-zA-Z0-9.]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#@]+)/
|
/https:\/\/([-a-zA-Z0-9.]+)\/@([-_.!~*\'()a-zA-Z0-9;\/?:\&=+\$,%#@]+)/
|
||||||
);
|
);
|
||||||
console.log(toot);
|
|
||||||
if(toot){
|
if(toot){
|
||||||
if(toot[1]){
|
if(toot[1]){
|
||||||
var acct_id=$a.parent().attr("data-acct");
|
var acct_id=$a.parent().attr("data-acct");
|
||||||
|
@ -42,7 +41,6 @@
|
||||||
tl('tag',decodeURI(tags[2]),acct_id,'add')
|
tl('tag',decodeURI(tags[2]),acct_id,'add')
|
||||||
}
|
}
|
||||||
}else if(ats){
|
}else if(ats){
|
||||||
console.log(ats);
|
|
||||||
if(ats[2]){
|
if(ats[2]){
|
||||||
//Quesdon判定
|
//Quesdon判定
|
||||||
if(!~ats[2].indexOf("@")){
|
if(!~ats[2].indexOf("@")){
|
||||||
|
@ -81,39 +79,6 @@
|
||||||
});
|
});
|
||||||
|
|
||||||
//よく使うライブラリ
|
//よく使うライブラリ
|
||||||
/*マルチバイト用切り出し*/
|
|
||||||
$.isSurrogatePear = function(upper, lower) {
|
|
||||||
return 0xD800 <= upper && upper <= 0xDBFF && 0xDC00 <= lower && lower <= 0xDFFF;
|
|
||||||
};
|
|
||||||
$.mb_strlen = function(str) {
|
|
||||||
var ret = 0;
|
|
||||||
for (var i = 0; i < str.length; i++, ret++) {
|
|
||||||
var upper = str.charCodeAt(i);
|
|
||||||
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
|
|
||||||
if ($.isSurrogatePear(upper, lower)) {
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
$.mb_substr = function(str, begin, end) {
|
|
||||||
var ret = '';
|
|
||||||
for (var i = 0, len = 0; i < str.length; i++, len++) {
|
|
||||||
var upper = str.charCodeAt(i);
|
|
||||||
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
|
|
||||||
var s = '';
|
|
||||||
if ($.isSurrogatePear(upper, lower)) {
|
|
||||||
i++;
|
|
||||||
s = String.fromCharCode(upper, lower);
|
|
||||||
} else {
|
|
||||||
s = String.fromCharCode(upper);
|
|
||||||
}
|
|
||||||
if (begin <= len && len < end) {
|
|
||||||
ret += s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
};
|
|
||||||
|
|
||||||
//コピー
|
//コピー
|
||||||
function execCopy(string){
|
function execCopy(string){
|
||||||
|
@ -132,7 +97,7 @@ function nano(){
|
||||||
function progshow(e) {
|
function progshow(e) {
|
||||||
if (e.lengthComputable) {
|
if (e.lengthComputable) {
|
||||||
var percent = e.loaded / e.total;
|
var percent = e.loaded / e.total;
|
||||||
console.log(percent * 100);
|
console.log("Progress: "+percent * 100);
|
||||||
$("#imgsel").hide();
|
$("#imgsel").hide();
|
||||||
if(percent<1){
|
if(percent<1){
|
||||||
$("#imgup").text(Math.floor(percent*100)+"%");
|
$("#imgup").text(Math.floor(percent*100)+"%");
|
||||||
|
@ -187,7 +152,7 @@ function playSound() {
|
||||||
context = new AudioContext();
|
context = new AudioContext();
|
||||||
context.createBufferSource().start(0);
|
context.createBufferSource().start(0);
|
||||||
context.decodeAudioData(request.response, function (buf) {
|
context.decodeAudioData(request.response, function (buf) {
|
||||||
console.log(source)
|
console.log("Playing:"+source)
|
||||||
source.buffer = buf;
|
source.buffer = buf;
|
||||||
source.loop = false;
|
source.loop = false;
|
||||||
});
|
});
|
||||||
|
@ -196,6 +161,5 @@ function playSound() {
|
||||||
source.connect(volumeControl);
|
source.connect(volumeControl);
|
||||||
volumeControl.connect(context.destination);
|
volumeControl.connect(context.destination);
|
||||||
volumeControl.gain.value=0.8
|
volumeControl.gain.value=0.8
|
||||||
console.log(volumeControl)
|
|
||||||
source.start(0);
|
source.start(0);
|
||||||
}
|
}
|
|
@ -165,3 +165,36 @@ function rgbToHex(color)
|
||||||
|
|
||||||
console.error(color+':第1引数はRGB形式で入力');
|
console.error(color+':第1引数はRGB形式で入力');
|
||||||
}
|
}
|
||||||
|
/*マルチバイト用切り出し*/
|
||||||
|
$.isSurrogatePear = function(upper, lower) {
|
||||||
|
return 0xD800 <= upper && upper <= 0xDBFF && 0xDC00 <= lower && lower <= 0xDFFF;
|
||||||
|
};
|
||||||
|
$.mb_strlen = function(str) {
|
||||||
|
var ret = 0;
|
||||||
|
for (var i = 0; i < str.length; i++, ret++) {
|
||||||
|
var upper = str.charCodeAt(i);
|
||||||
|
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
|
||||||
|
if ($.isSurrogatePear(upper, lower)) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
$.mb_substr = function(str, begin, end) {
|
||||||
|
var ret = '';
|
||||||
|
for (var i = 0, len = 0; i < str.length; i++, len++) {
|
||||||
|
var upper = str.charCodeAt(i);
|
||||||
|
var lower = str.length > (i + 1) ? str.charCodeAt(i + 1) : 0;
|
||||||
|
var s = '';
|
||||||
|
if ($.isSurrogatePear(upper, lower)) {
|
||||||
|
i++;
|
||||||
|
s = String.fromCharCode(upper, lower);
|
||||||
|
} else {
|
||||||
|
s = String.fromCharCode(upper);
|
||||||
|
}
|
||||||
|
if (begin <= len && len < end) {
|
||||||
|
ret += s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
};
|
|
@ -14,7 +14,6 @@ function tl(data) {
|
||||||
$("#notice_nano").text(cap(type, data) + " TL(" + localStorage.getItem(
|
$("#notice_nano").text(cap(type, data) + " TL(" + localStorage.getItem(
|
||||||
"user_" + acct_id) + "@" + domain + ")");
|
"user_" + acct_id) + "@" + domain + ")");
|
||||||
var start = "https://" + domain + "/api/v1/timelines/" + com(type, data);
|
var start = "https://" + domain + "/api/v1/timelines/" + com(type, data);
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -46,17 +45,12 @@ var websocket=[];
|
||||||
var start = "wss://" + domain +
|
var start = "wss://" + domain +
|
||||||
"/api/v1/streaming/?stream=hashtag&tag=" + data +"&access_token=" + at;
|
"/api/v1/streaming/?stream=hashtag&tag=" + data +"&access_token=" + at;
|
||||||
}
|
}
|
||||||
console.log(start);
|
|
||||||
var wsid = websocket.length;
|
var wsid = websocket.length;
|
||||||
websocket[wsid] = new WebSocket(start);
|
websocket[wsid] = new WebSocket(start);
|
||||||
websocket[wsid].onopen = function(mess) {
|
websocket[wsid].onopen = function(mess) {
|
||||||
console.log(tlid + ":Connect Streaming API:" + type);
|
|
||||||
console.log(mess);
|
|
||||||
$("#notice_icon_" + tlid).removeClass("red-text");
|
$("#notice_icon_" + tlid).removeClass("red-text");
|
||||||
}
|
}
|
||||||
websocket[wsid].onmessage = function(mess) {
|
websocket[wsid].onmessage = function(mess) {
|
||||||
console.log(tlid + ":Receive Streaming API:");
|
|
||||||
console.log(websocket[wsid]);
|
|
||||||
var typeA = JSON.parse(mess.data).event;
|
var typeA = JSON.parse(mess.data).event;
|
||||||
if (typeA == "delete") {
|
if (typeA == "delete") {
|
||||||
var obj = JSON.parse(mess.data).payload;
|
var obj = JSON.parse(mess.data).payload;
|
||||||
|
@ -64,12 +58,11 @@ var websocket=[];
|
||||||
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
$("[toot-id=" + JSON.parse(mess.data).payload + "]").remove();
|
||||||
} 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);
|
|
||||||
var templete = parse([obj], '', acct_id, tlid);
|
var templete = parse([obj], '', acct_id, tlid);
|
||||||
$("#timeline_nano").html(templete);
|
$("#timeline_nano").html(templete);
|
||||||
}
|
}
|
||||||
websocket[wsid].onclose = function(mess) {
|
websocket[wsid].onclose = function(mess) {
|
||||||
console.log("Close Streaming API:" + type);
|
console.error("Close Streaming API:" + type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
websocket[wsid].onerror = function(error) {
|
websocket[wsid].onerror = function(error) {
|
||||||
|
|
|
@ -179,7 +179,6 @@ function emojiInsert(code, del) {
|
||||||
} else {
|
} else {
|
||||||
var brank = " ";
|
var brank = " ";
|
||||||
}
|
}
|
||||||
console.log(selin);
|
|
||||||
var now = $("#textarea").val();
|
var now = $("#textarea").val();
|
||||||
if (selin > 0) {
|
if (selin > 0) {
|
||||||
var before = now.substr(0, selin);
|
var before = now.substr(0, selin);
|
||||||
|
|
|
@ -36,7 +36,7 @@ $("#drag").on('dragleave', function(e) {
|
||||||
|
|
||||||
//複数アップ
|
//複数アップ
|
||||||
function pimg(files) {
|
function pimg(files) {
|
||||||
console.log(files);
|
console.table(files);
|
||||||
for (i = 0; i < files.length; i++) {
|
for (i = 0; i < files.length; i++) {
|
||||||
var dot=files[i].path.match(/\.(.+)$/)[1];
|
var dot=files[i].path.match(/\.(.+)$/)[1];
|
||||||
if(dot=="bmp" || dot=="BMP"){
|
if(dot=="bmp" || dot=="BMP"){
|
||||||
|
@ -95,7 +95,6 @@ function media(b64, type, no) {
|
||||||
localStorage.setItem("image","busy");
|
localStorage.setItem("image","busy");
|
||||||
todo("Image Upload...");
|
todo("Image Upload...");
|
||||||
var media = toBlob(b64, type);
|
var media = toBlob(b64, type);
|
||||||
console.log(media);
|
|
||||||
var fd = new FormData();
|
var fd = new FormData();
|
||||||
fd.append('file', media);
|
fd.append('file', media);
|
||||||
var acct_id = $("#post-acct-sel").val();
|
var acct_id = $("#post-acct-sel").val();
|
||||||
|
@ -128,7 +127,6 @@ function media(b64, type, no) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
var img = localStorage.getItem("img");
|
var img = localStorage.getItem("img");
|
||||||
if (json.type.indexOf("image")!=-1) {
|
if (json.type.indexOf("image")!=-1) {
|
||||||
var html = '<img src="' + json[previewer] + '" class="preview-img pointer" data-media="'+json["id"]+'" onclick="deleteImage(\''+json["id"]+'\')" title="'+lang.lang_postimg_delete+'">';
|
var html = '<img src="' + json[previewer] + '" class="preview-img pointer" data-media="'+json["id"]+'" onclick="deleteImage(\''+json["id"]+'\')" title="'+lang.lang_postimg_delete+'">';
|
||||||
|
@ -182,14 +180,13 @@ function toBlob(base64, type) {
|
||||||
//画像を貼り付けたら…
|
//画像を貼り付けたら…
|
||||||
var element = document.querySelector("#textarea");
|
var element = document.querySelector("#textarea");
|
||||||
element.addEventListener("paste", function(e){
|
element.addEventListener("paste", function(e){
|
||||||
console.log(e)
|
|
||||||
if (!e.clipboardData || !e.clipboardData.items) {
|
if (!e.clipboardData || !e.clipboardData.items) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// DataTransferItemList に画像が含まれいない場合は終了する
|
// DataTransferItemList に画像が含まれいない場合は終了する
|
||||||
var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image'));
|
var imageItems = [...e.clipboardData.items].filter(i => i.type.startsWith('image'));
|
||||||
if (imageItems.length == 0) {
|
if (imageItems.length == 0) {
|
||||||
console.log("not image")
|
console.warn("it is not image")
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,7 +220,6 @@ ipc.on('adobeagree', function (event, arg) {
|
||||||
localStorage.setItem("adobeagree",arg);
|
localStorage.setItem("adobeagree",arg);
|
||||||
});
|
});
|
||||||
function deleteImage(key){
|
function deleteImage(key){
|
||||||
console.log(key);
|
|
||||||
if(!confirm(lang.lang_postimg_delete)){
|
if(!confirm(lang.lang_postimg_delete)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@ function renote(id, acct_id, remote) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: renote",json]);
|
||||||
$("[toot-id=" + id + "]").addClass("rted");
|
$("[toot-id=" + id + "]").addClass("rted");
|
||||||
$(".rt_"+id).toggleClass("teal-text");
|
$(".rt_"+id).toggleClass("teal-text");
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ function reactiontoggle(id,acct_id,tlid){
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: reaction",json]);
|
||||||
if(json.reactions){
|
if(json.reactions){
|
||||||
var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding","rip"];
|
var reactions=["like","love","laugh","hmm","surprise","congrats","angry","confused","pudding","rip"];
|
||||||
for(var i=0;i<reactions.length;i++){
|
for(var i=0;i<reactions.length;i++){
|
||||||
|
@ -121,7 +121,6 @@ function reactRefresh(acct_id,id){
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: JSON.stringify(req),
|
body: JSON.stringify(req),
|
||||||
}
|
}
|
||||||
console.log(req)
|
|
||||||
fetch(start, i,
|
fetch(start, i,
|
||||||
).then(function(response) {
|
).then(function(response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
|
@ -149,7 +148,6 @@ function reactRefreshCore(json){
|
||||||
Object.keys(json.reactions).forEach(function(keye) {
|
Object.keys(json.reactions).forEach(function(keye) {
|
||||||
keyeClass=keye.replace(regExp,'');
|
keyeClass=keye.replace(regExp,'');
|
||||||
if(json.reactions[keye]){
|
if(json.reactions[keye]){
|
||||||
console.log(json.reactions[keye])
|
|
||||||
$("#pub_" + id +" .re-"+keyeClass+"ct").text(json.reactions[keye])
|
$("#pub_" + id +" .re-"+keyeClass+"ct").text(json.reactions[keye])
|
||||||
$("#pub_" + id +" .re-"+keyeClass).removeClass("hide")
|
$("#pub_" + id +" .re-"+keyeClass).removeClass("hide")
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -129,7 +129,7 @@ function post(mode,postvis) {
|
||||||
}
|
}
|
||||||
if ($("#sch-box").hasClass("sch-avail")) {
|
if ($("#sch-box").hasClass("sch-avail")) {
|
||||||
var scheduled=formattimeutc(new Date(Date.parse($("#sch-date").val())))
|
var scheduled=formattimeutc(new Date(Date.parse($("#sch-date").val())))
|
||||||
console.log(scheduled)
|
console.log("This toot will be posted at:"+scheduled)
|
||||||
schedule();
|
schedule();
|
||||||
toot.scheduled_at=scheduled;
|
toot.scheduled_at=scheduled;
|
||||||
} else {
|
} else {
|
||||||
|
@ -164,7 +164,7 @@ function post(mode,postvis) {
|
||||||
hide_totals: htt
|
hide_totals: htt
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(toot);
|
console.table(toot);
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open('POST', start, true);
|
httpreq.open('POST', start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
@ -245,7 +245,7 @@ function misskeyPost(){
|
||||||
localStorage.removeItem("stable")
|
localStorage.removeItem("stable")
|
||||||
}
|
}
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: toot",json]);
|
||||||
var box = localStorage.getItem("box");
|
var box = localStorage.getItem("box");
|
||||||
if (box == "yes") {
|
if (box == "yes") {
|
||||||
hide();
|
hide();
|
||||||
|
|
|
@ -49,7 +49,6 @@ function vis(set){
|
||||||
}
|
}
|
||||||
function loadVis(){
|
function loadVis(){
|
||||||
var vist = localStorage.getItem("vis");
|
var vist = localStorage.getItem("vis");
|
||||||
console.log(vist);
|
|
||||||
if (!vist) {
|
if (!vist) {
|
||||||
vis("public");
|
vis("public");
|
||||||
} else {
|
} else {
|
||||||
|
@ -123,7 +122,6 @@ function schedule(){
|
||||||
|
|
||||||
$("#sch-box").show();
|
$("#sch-box").show();
|
||||||
$("#sch-date").val(formattime(date));
|
$("#sch-date").val(formattime(date));
|
||||||
console.log(formattime(date));
|
|
||||||
$("#sch-box").addClass("sch-avail");
|
$("#sch-box").addClass("sch-avail");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ function rt(id, acct_id, remote) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: boost",json]);
|
||||||
if (remote != "remote") {
|
if (remote != "remote") {
|
||||||
$("[toot-id=" + id + "] .fav_ct").text(json.favourites_count);
|
$("[toot-id=" + id + "] .fav_ct").text(json.favourites_count);
|
||||||
if (!json.reblog) {
|
if (!json.reblog) {
|
||||||
|
@ -128,7 +128,6 @@ function follow(acct_id,remote) {
|
||||||
var start = "https://" + domain + "/api/v1/accounts/" + id + "/" + flag;
|
var start = "https://" + domain + "/api/v1/accounts/" + id + "/" + flag;
|
||||||
var ent={}
|
var ent={}
|
||||||
}
|
}
|
||||||
console.log(ent);
|
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open('POST', start, true);
|
httpreq.open('POST', start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
@ -138,7 +137,7 @@ function follow(acct_id,remote) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: folllow",json]);
|
||||||
if ($("#his-data").hasClass("following")) {
|
if ($("#his-data").hasClass("following")) {
|
||||||
$("#his-data").removeClass("following");
|
$("#his-data").removeClass("following");
|
||||||
$("#his-follow-btn").text(lang.lang_status_follow);
|
$("#his-follow-btn").text(lang.lang_status_follow);
|
||||||
|
@ -266,7 +265,7 @@ function redraft(id, acct_id){
|
||||||
$("[toot-id="+id+"] img.toot-img").each(function(i, elem) {
|
$("[toot-id="+id+"] img.toot-img").each(function(i, elem) {
|
||||||
if(i<ct){
|
if(i<ct){
|
||||||
var url=$(elem).attr("src");
|
var url=$(elem).attr("src");
|
||||||
console.log(url);
|
console.log("Play back image data:"+url);
|
||||||
$('#preview').append('<img src="' + url + '" style="width:50px; max-height:100px;">');
|
$('#preview').append('<img src="' + url + '" style="width:50px; max-height:100px;">');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -307,7 +306,7 @@ function pin(id, acct_id) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: pinned",json]);
|
||||||
if ($("[toot-id=" + id + "]").hasClass("pined")) {
|
if ($("[toot-id=" + id + "]").hasClass("pined")) {
|
||||||
$("[toot-id=" + id + "]").removeClass("pined");
|
$("[toot-id=" + id + "]").removeClass("pined");
|
||||||
$(".pin_" + id).removeClass("blue-text");
|
$(".pin_" + id).removeClass("blue-text");
|
||||||
|
@ -333,7 +332,7 @@ function request(id, flag, acct_id) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: request","type:"+flag,json]);
|
||||||
showReq();
|
showReq();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,7 +355,7 @@ function domainblock(add, flag, acct_id) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["Success: domain block",json]);
|
||||||
showDom();
|
showDom();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,7 +370,6 @@ function empUser(){
|
||||||
var usr = localStorage.getItem("user_emp");
|
var usr = localStorage.getItem("user_emp");
|
||||||
var obj = JSON.parse(usr);
|
var obj = JSON.parse(usr);
|
||||||
var id=$("#his-acct").attr("fullname");
|
var id=$("#his-acct").attr("fullname");
|
||||||
console.log(id);
|
|
||||||
if(!obj){
|
if(!obj){
|
||||||
var obj=[];
|
var obj=[];
|
||||||
obj.push(id);
|
obj.push(id);
|
||||||
|
@ -413,7 +411,6 @@ function pinUser(){
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
if ($("#his-end-btn").hasClass("endorsed")) {
|
if ($("#his-end-btn").hasClass("endorsed")) {
|
||||||
$("#his-end-btn").removeClass("endorsed")
|
$("#his-end-btn").removeClass("endorsed")
|
||||||
$("#his-end-btn").text(lang.lang_status_endorse)
|
$("#his-end-btn").text(lang.lang_status_endorse)
|
||||||
|
|
|
@ -68,7 +68,7 @@ input.addEventListener("focus", function() {
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
suggest = "https://" + domain + "/api/v1/search?q=" + q
|
suggest = "https://" + domain + "/api/v1/search?q=" + q
|
||||||
if (suggest != oldSuggest) {
|
if (suggest != oldSuggest) {
|
||||||
console.log(suggest)
|
console.log("Try to get suggest at "+suggest)
|
||||||
fetch(suggest, {
|
fetch(suggest, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -152,7 +152,7 @@ function tagInsert(code, del) {
|
||||||
function cgNPs(q){
|
function cgNPs(q){
|
||||||
suggest = "https://cg.toot.app/api/v1/search/light?q=" + q
|
suggest = "https://cg.toot.app/api/v1/search/light?q=" + q
|
||||||
if (suggest != oldSuggest) {
|
if (suggest != oldSuggest) {
|
||||||
console.log(suggest)
|
console.log("Try to get suggest at "+suggest)
|
||||||
fetch(suggest, {
|
fetch(suggest, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -164,7 +164,6 @@ function cgNPs(q){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json[0]) {
|
if (json[0]) {
|
||||||
var tags = "";
|
var tags = "";
|
||||||
Object.keys(json).forEach(function(key4) {
|
Object.keys(json).forEach(function(key4) {
|
||||||
|
|
|
@ -170,9 +170,7 @@ function additionalIndv(tlid, acct_id, id) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
//このリンク鳥やんけ、ってとき
|
//このリンク鳥やんけ、ってとき
|
||||||
console.log(json.provider_name);
|
|
||||||
if (json.provider_name=="Twitter"){
|
if (json.provider_name=="Twitter"){
|
||||||
if(json.image){
|
if(json.image){
|
||||||
var twiImg='<br><img src="'+json.image+'" style="max-width:100%" onclick="imgv(\'twi_'+id+'\', 0, \'twitter\');" id="twi_'+id+'-image-0" data-url="'+json.image+'" data-type="image">';
|
var twiImg='<br><img src="'+json.image+'" style="max-width:100%" onclick="imgv(\'twi_'+id+'\', 0, \'twitter\');" id="twi_'+id+'-image-0" data-url="'+json.image+'" data-type="image">';
|
||||||
|
@ -243,7 +241,6 @@ function mov(id,tlid,type){
|
||||||
}else{
|
}else{
|
||||||
var tlide="[tlid="+tlid+"]";
|
var tlide="[tlid="+tlid+"]";
|
||||||
}
|
}
|
||||||
console.log(tlid)
|
|
||||||
var mouseover=localStorage.getItem("mouseover");
|
var mouseover=localStorage.getItem("mouseover");
|
||||||
if(!mouseover){
|
if(!mouseover){
|
||||||
mouseover="";
|
mouseover="";
|
||||||
|
|
|
@ -40,7 +40,7 @@ function details(id, acct_id, tlid, mode) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
console.log(["Toot data:",json]);
|
||||||
if(!$("#timeline_"+tlid+" #pub_" + id).length){
|
if(!$("#timeline_"+tlid+" #pub_" + id).length){
|
||||||
var html = parse([json], '', acct_id);
|
var html = parse([json], '', acct_id);
|
||||||
$("#toot-this").html(html);
|
$("#toot-this").html(html);
|
||||||
|
@ -208,7 +208,6 @@ function context(id, acct_id) {
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
if(localStorage.getItem("mode_" + domain)=="misskey"){
|
if(localStorage.getItem("mode_" + domain)=="misskey"){
|
||||||
json.reverse();
|
json.reverse();
|
||||||
console.log(json);
|
|
||||||
var templete = misskeyParse(json, '', acct_id,"","",[]);
|
var templete = misskeyParse(json, '', acct_id,"","",[]);
|
||||||
$("#toot-reply").html(templete);
|
$("#toot-reply").html(templete);
|
||||||
$("#toot-reply .hide").html(lang.lang_details_filtered);
|
$("#toot-reply .hide").html(lang.lang_details_filtered);
|
||||||
|
@ -482,7 +481,7 @@ function staCopy(id){
|
||||||
html = html.replace(/<br\s?\/?>/, "\n");
|
html = html.replace(/<br\s?\/?>/, "\n");
|
||||||
html = html.replace(/<p>/, "\n");
|
html = html.replace(/<p>/, "\n");
|
||||||
html = html.replace(/<\/p>/, "\n");
|
html = html.replace(/<\/p>/, "\n");
|
||||||
console.log(html);
|
console.log("Copy it:\n"+html);
|
||||||
html = html.replace(/<img[\s\S]*alt="(.+?)"[\s\S]*?>/g, "$1");
|
html = html.replace(/<img[\s\S]*alt="(.+?)"[\s\S]*?>/g, "$1");
|
||||||
html=$.strip_tags(html);
|
html=$.strip_tags(html);
|
||||||
if(execCopy(html)){
|
if(execCopy(html)){
|
||||||
|
@ -505,7 +504,7 @@ function trans(tar,to){
|
||||||
}
|
}
|
||||||
$("#toot-this .additional").text("Loading...(Powered by Google Translate)");
|
$("#toot-this .additional").text("Loading...(Powered by Google Translate)");
|
||||||
var exec='https://script.google.com/macros/s/AKfycbxhwW5tjjop9Irg-y1zr_WsXlCKEzwWG6KuoOt_vVRDfEbRv0c/exec?format=json&text='+encodeURIComponent(html)+'&source='+tar+'&target='+to
|
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);
|
console.log("Try to translate from "+tar+" to "+to+" at "+exec);
|
||||||
fetch(exec, {
|
fetch(exec, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
}).then(function(response) {
|
}).then(function(response) {
|
||||||
|
|
|
@ -57,7 +57,6 @@ function dmmore(tlid){
|
||||||
}
|
}
|
||||||
//DMオブジェクトパーサー(トゥート)
|
//DMオブジェクトパーサー(トゥート)
|
||||||
function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
console.log(obj);
|
|
||||||
var templete = '';
|
var templete = '';
|
||||||
if(obj[0]){
|
if(obj[0]){
|
||||||
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
|
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
|
||||||
|
|
|
@ -114,7 +114,6 @@ function filter(){
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/filters"
|
var start = "https://" + domain + "/api/v1/filters"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -127,7 +126,6 @@ function filter(){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json) {
|
if (json) {
|
||||||
var filters = "";
|
var filters = "";
|
||||||
Object.keys(json).forEach(function(key) {
|
Object.keys(json).forEach(function(key) {
|
||||||
|
@ -167,7 +165,6 @@ function makeNewFilter(){
|
||||||
if($("#conv_filter:checked").val()){
|
if($("#conv_filter:checked").val()){
|
||||||
cont.push("thread");
|
cont.push("thread");
|
||||||
}
|
}
|
||||||
console.log(cont);
|
|
||||||
if(!cont.length){
|
if(!cont.length){
|
||||||
$("#filtered-words").html('Error:'+lang.lang_filter_errordegree);
|
$("#filtered-words").html('Error:'+lang.lang_filter_errordegree);
|
||||||
}
|
}
|
||||||
|
@ -235,7 +232,6 @@ function filterEdit(id,acct_id){
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/filters/"+id
|
var start = "https://" + domain + "/api/v1/filters/"+id
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -248,7 +244,6 @@ function filterEdit(id,acct_id){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if (json) {
|
if (json) {
|
||||||
var now = new Date() ;
|
var now = new Date() ;
|
||||||
now = now.getTime() ;
|
now = now.getTime() ;
|
||||||
|
@ -297,7 +292,6 @@ function getFilter(acct_id){
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
||||||
var start = "https://" + domain + "/api/v1/filters"
|
var start = "https://" + domain + "/api/v1/filters"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -341,7 +335,6 @@ function filterUpdate(acct_id){
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/filters"
|
var start = "https://" + domain + "/api/v1/filters"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -40,7 +40,6 @@ function list(){
|
||||||
});
|
});
|
||||||
}else{
|
}else{
|
||||||
var start = "https://" + domain + "/api/v1/lists"
|
var start = "https://" + domain + "/api/v1/lists"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -75,7 +74,6 @@ function makeNewList(){
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
||||||
var start = "https://" + domain + "/api/v1/lists"
|
var start = "https://" + domain + "/api/v1/lists"
|
||||||
console.log(start)
|
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open('POST', start, true);
|
httpreq.open('POST', start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
@ -93,7 +91,6 @@ function makeNewList(){
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
var start = "https://" + domain + "/api/users/lists/create"
|
var start = "https://" + domain + "/api/users/lists/create"
|
||||||
console.log(start)
|
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open('POST', start, true);
|
httpreq.open('POST', start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
@ -119,7 +116,6 @@ function listUser(id,acct_id){
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
|
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -149,7 +145,6 @@ function hisList(user,acct_id){
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
if(localStorage.getItem("mode_" + domain)!="misskey"){
|
||||||
var start = "https://" + domain + "/api/v1/lists"
|
var start = "https://" + domain + "/api/v1/lists"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -175,7 +170,6 @@ function hisList(user,acct_id){
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
var start = "https://" + domain + "/api/v1/accounts/"+user+"/lists"
|
var start = "https://" + domain + "/api/v1/accounts/"+user+"/lists"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -245,7 +239,6 @@ function listAdd(id,user,acct_id){
|
||||||
account_ids: [user]
|
account_ids: [user]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(start)
|
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open('POST', start, true);
|
httpreq.open('POST', start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
@ -277,7 +270,6 @@ function listRemove(id,user,acct_id){
|
||||||
account_ids: [user]
|
account_ids: [user]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(start)
|
|
||||||
var httpreq = new XMLHttpRequest();
|
var httpreq = new XMLHttpRequest();
|
||||||
httpreq.open(method, start, true);
|
httpreq.open(method, start, true);
|
||||||
httpreq.setRequestHeader('Content-Type', 'application/json');
|
httpreq.setRequestHeader('Content-Type', 'application/json');
|
||||||
|
|
|
@ -857,7 +857,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
|
||||||
|
|
||||||
//オブジェクトパーサー(ユーザーデータ)
|
//オブジェクトパーサー(ユーザーデータ)
|
||||||
function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
|
function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
|
||||||
console.log(obj)
|
console.log(["Parse them ",obj])
|
||||||
if (popup > 0 || popup == -1) {
|
if (popup > 0 || popup == -1) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -984,15 +984,14 @@ function connectMisskey(acct_id) {
|
||||||
localStorage.setItem("misskey_wss_" + acct_id, wsid);
|
localStorage.setItem("misskey_wss_" + acct_id, wsid);
|
||||||
misskeyws[wsid] = new WebSocket(start);
|
misskeyws[wsid] = new WebSocket(start);
|
||||||
misskeyws[wsid].onopen = function (mess) {
|
misskeyws[wsid].onopen = function (mess) {
|
||||||
console.log(tlid + ":Connect Streaming API:"+domain);
|
console.table({"tlid":tlid,"type":"Connect Streaming API","domain":domain,"message":[mess]})
|
||||||
console.log(mess);
|
|
||||||
misskeywsstate[wsid]=true
|
misskeywsstate[wsid]=true
|
||||||
//$("#notice_icon_" + tlid).removeClass("red-text");
|
//$("#notice_icon_" + tlid).removeClass("red-text");
|
||||||
var send='{"type":"connect","body":{"channel":"main","id":"notf:'+acct_id+'"}}'
|
var send='{"type":"connect","body":{"channel":"main","id":"notf:'+acct_id+'"}}'
|
||||||
misskeyws[wsid].send(send)
|
misskeyws[wsid].send(send)
|
||||||
}
|
}
|
||||||
misskeyws[wsid].onmessage = function (mess) {
|
misskeyws[wsid].onmessage = function (mess) {
|
||||||
console.log(acct_id + ":Receive Streaming API:");
|
console.log([domain + ":Receive Streaming API:",data]);
|
||||||
var data=JSON.parse(mess.data)
|
var data=JSON.parse(mess.data)
|
||||||
var obj=data.body.body
|
var obj=data.body.body
|
||||||
|
|
||||||
|
@ -1010,7 +1009,7 @@ function connectMisskey(acct_id) {
|
||||||
templete = misskeyUserparse([obj.body], 'notf', acct_id, 'notf', popup);
|
templete = misskeyUserparse([obj.body], 'notf', acct_id, 'notf', popup);
|
||||||
}
|
}
|
||||||
if(JSON.parse(mess.data).body.type=="reaction"){
|
if(JSON.parse(mess.data).body.type=="reaction"){
|
||||||
console.log("refresh")
|
console.log("reaction refresh")
|
||||||
reactRefresh(acct_id,obj.body.note.id)
|
reactRefresh(acct_id,obj.body.note.id)
|
||||||
}
|
}
|
||||||
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.body.id+"]").length){
|
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.body.id+"]").length){
|
||||||
|
@ -1048,7 +1047,6 @@ function connectMisskey(acct_id) {
|
||||||
jQuery("time.timeago").timeago();
|
jQuery("time.timeago").timeago();
|
||||||
}else if (data.type == "noteUpdated") {
|
}else if (data.type == "noteUpdated") {
|
||||||
if(data.body.type=="reacted"){
|
if(data.body.type=="reacted"){
|
||||||
console.log(data.body.id)
|
|
||||||
reactRefresh(acct_id,data.body.id)
|
reactRefresh(acct_id,data.body.id)
|
||||||
}else if(data.body.type=="deleted"){
|
}else if(data.body.type=="deleted"){
|
||||||
$("#pub_"+data.body.id).hide();
|
$("#pub_"+data.body.id).hide();
|
||||||
|
@ -1058,15 +1056,14 @@ function connectMisskey(acct_id) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
misskeyws[wsid].onerror = function (error) {
|
misskeyws[wsid].onerror = function (error) {
|
||||||
console.error("Error closing");
|
console.error("Error closing "+tlid);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
misskeywsstate[wsid]=false
|
misskeywsstate[wsid]=false
|
||||||
connectMisskey(acct_id)
|
connectMisskey(acct_id)
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
misskeyws[wsid].onclose = function () {
|
misskeyws[wsid].onclose = function () {
|
||||||
console.log("Closing");
|
console.warn("Closing "+tlid);
|
||||||
console.log(tlid);
|
|
||||||
misskeywsstate[wsid]=false
|
misskeywsstate[wsid]=false
|
||||||
connectMisskey(acct_id)
|
connectMisskey(acct_id)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
//Integrated TL
|
//Integrated TL
|
||||||
function mixtl(acct_id, tlid, type,delc,voice) {
|
function mixtl(acct_id, tlid, type,delc,voice) {
|
||||||
console.log(delc);
|
|
||||||
localStorage.removeItem("morelock")
|
localStorage.removeItem("morelock")
|
||||||
localStorage.setItem("now", type);
|
localStorage.setItem("now", type);
|
||||||
todo("Integrated TL Loading...(Local)");
|
todo("Integrated TL Loading...(Local)");
|
||||||
|
@ -94,21 +93,18 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
|
||||||
websocketLocal[wslid] = new WebSocket(startLocal);
|
websocketLocal[wslid] = new WebSocket(startLocal);
|
||||||
websocketHome[wshid].onopen = function(mess) {
|
websocketHome[wshid].onopen = function(mess) {
|
||||||
localStorage.setItem("wssH_" + tlid, wshid);
|
localStorage.setItem("wssH_" + tlid, wshid);
|
||||||
console.log(tlid + ":Connect Streaming API(Integrated:Home)");
|
console.table({"tlid":tlid,"type":"Connect Streaming API(Integrated:Home)","domain":domain,"message":mess})
|
||||||
console.log(mess);
|
|
||||||
$("#notice_icon_" + tlid).removeClass("red-text");
|
$("#notice_icon_" + tlid).removeClass("red-text");
|
||||||
}
|
}
|
||||||
websocketLocal[wslid].onopen = function(mess) {
|
websocketLocal[wslid].onopen = function(mess) {
|
||||||
localStorage.setItem("wssL_" + tlid, wslid);
|
localStorage.setItem("wssL_" + tlid, wslid);
|
||||||
console.log(tlid + ":Connect Streaming API(Integrated:Local)");
|
console.table({"tlid":tlid,"type":"Connect Streaming API(Integrated:Local)","domain":domain,"message":mess})
|
||||||
console.log(mess);
|
|
||||||
$("#notice_icon_" + tlid).removeClass("red-text");
|
$("#notice_icon_" + tlid).removeClass("red-text");
|
||||||
}
|
}
|
||||||
websocketLocal[wslid].onmessage = function(mess) {
|
websocketLocal[wslid].onmessage = function(mess) {
|
||||||
console.log("Receive Streaming API:(Integrated:Local)");
|
console.log(["Receive Streaming API:(Integrated:Local)",obj]);
|
||||||
|
|
||||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||||
console.log(obj);
|
|
||||||
var type = JSON.parse(mess.data).event;
|
var type = JSON.parse(mess.data).event;
|
||||||
if (type == "delete") {
|
if (type == "delete") {
|
||||||
if(delc=="true"){
|
if(delc=="true"){
|
||||||
|
@ -145,10 +141,8 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
websocketHome[wshid].onmessage = function(mess) {
|
websocketHome[wshid].onmessage = function(mess) {
|
||||||
console.log("Receive Streaming API:(Integrated:Home)");
|
console.log(["Receive Streaming API:(Integrated:Home)",obj]);
|
||||||
|
|
||||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||||
console.log(obj);
|
|
||||||
var type = JSON.parse(mess.data).event;
|
var type = JSON.parse(mess.data).event;
|
||||||
if (type == "delete") {
|
if (type == "delete") {
|
||||||
if(del>10){
|
if(del>10){
|
||||||
|
@ -211,7 +205,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
websocketLocal[wslid].onclose = function() {
|
websocketLocal[wslid].onclose = function() {
|
||||||
console.log('WebSocketLocal Closing:' + tlid);
|
console.warn('WebSocketLocal Closing:' + tlid);
|
||||||
if(mode=="error"){
|
if(mode=="error"){
|
||||||
$("#notice_icon_" + tlid).addClass("red-text");
|
$("#notice_icon_" + tlid).addClass("red-text");
|
||||||
todo('WebSocket Closed');
|
todo('WebSocket Closed');
|
||||||
|
@ -224,8 +218,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
websocketHome[wshid].onerror = function(error) {
|
websocketHome[wshid].onerror = function(error) {
|
||||||
console.error('WebSocketHome Error')
|
console.error(['WebSocketHome Error',error])
|
||||||
console.error(error);
|
|
||||||
if(mode=="error"){
|
if(mode=="error"){
|
||||||
$("#notice_icon_" + tlid).addClass("red-text");
|
$("#notice_icon_" + tlid).addClass("red-text");
|
||||||
todo('WebSocket Error ' + error);
|
todo('WebSocket Error ' + error);
|
||||||
|
@ -238,7 +231,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
websocketHome[wshid].onclose = function() {
|
websocketHome[wshid].onclose = function() {
|
||||||
console.log('WebSocketHome Closing:' + tlid);
|
console.warn('WebSocketHome Closing:' + tlid);
|
||||||
if(mode=="error"){
|
if(mode=="error"){
|
||||||
$("#notice_icon_" + tlid).addClass("red-text");
|
$("#notice_icon_" + tlid).addClass("red-text");
|
||||||
todo('WebSocket Closed');
|
todo('WebSocket Closed');
|
||||||
|
|
|
@ -147,7 +147,7 @@ function notfCommon(acct_id, tlid, sys) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fetch(start, i).then(function(response) {
|
fetch(start, i).then(function(response) {
|
||||||
console.log(response.headers.get('link'));
|
console.log("header to get param:"+response.headers.get('link'));
|
||||||
return response.json();
|
return response.json();
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
todo(error);
|
todo(error);
|
||||||
|
@ -218,25 +218,20 @@ function notfWS(misskey,acct_id,tlid,domain,at){
|
||||||
var start = wss + "/api/v1/streaming/?stream=user&access_token=" +
|
var start = wss + "/api/v1/streaming/?stream=user&access_token=" +
|
||||||
at;
|
at;
|
||||||
|
|
||||||
console.log(start);
|
|
||||||
var wsid = websocketNotf.length;
|
var wsid = websocketNotf.length;
|
||||||
websocketNotf[acct_id] = new WebSocket(start);
|
websocketNotf[acct_id] = new WebSocket(start);
|
||||||
console.log(websocketNotf);
|
|
||||||
websocketNotf[acct_id].onopen = function(mess) {
|
websocketNotf[acct_id].onopen = function(mess) {
|
||||||
console.log("Connect Streaming API(Notf):");
|
console.table({"acct_id":acct_id,"type":"Connect Streaming API(Notf)","domain":domain,"message":[mess]})
|
||||||
console.log(mess);
|
|
||||||
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
|
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
|
||||||
|
|
||||||
}
|
}
|
||||||
websocketNotf[acct_id].onmessage = function(mess) {
|
websocketNotf[acct_id].onmessage = function(mess) {
|
||||||
console.log("Receive Streaming API(Notf):"+acct_id);
|
console.log(["Receive Streaming API(Notf):"+acct_id+"("+domain+")",JSON.parse(JSON.parse(mess.data).payload)]);
|
||||||
var popup = localStorage.getItem("popup");
|
var popup = localStorage.getItem("popup");
|
||||||
if (!popup) {
|
if (!popup) {
|
||||||
popup = 0;
|
popup = 0;
|
||||||
}
|
}
|
||||||
console.log(domain)
|
|
||||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||||
console.log(obj);
|
|
||||||
var type = JSON.parse(mess.data).event;
|
var type = JSON.parse(mess.data).event;
|
||||||
if (type == "notification") {
|
if (type == "notification") {
|
||||||
var templete="";
|
var templete="";
|
||||||
|
@ -264,8 +259,7 @@ function notfWS(misskey,acct_id,tlid,domain,at){
|
||||||
}
|
}
|
||||||
//一定のスクロールで発火
|
//一定のスクロールで発火
|
||||||
function notfmore(tlid) {
|
function notfmore(tlid) {
|
||||||
console.log(moreloading);
|
console.log({"status":"kicked","status":moreloading});
|
||||||
console.log("kicked");
|
|
||||||
var multi = localStorage.getItem("column");
|
var multi = localStorage.getItem("column");
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
var acct_id = obj[tlid].domain;
|
var acct_id = obj[tlid].domain;
|
||||||
|
@ -308,7 +302,7 @@ function notfmore(tlid) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
console.log(["More notifications on "+tlid,json]);
|
||||||
var max_id = httpreq.getResponseHeader("link").match(/[?&]{1}max_id=([0-9]+)/)[1];
|
var max_id = httpreq.getResponseHeader("link").match(/[?&]{1}max_id=([0-9]+)/)[1];
|
||||||
if(json[0]){
|
if(json[0]){
|
||||||
var templete="";
|
var templete="";
|
||||||
|
@ -392,12 +386,10 @@ function notfCanceler(acct){
|
||||||
$(".notf-icon_" + acct).removeClass("red-text");
|
$(".notf-icon_" + acct).removeClass("red-text");
|
||||||
}
|
}
|
||||||
function allNotfRead(){
|
function allNotfRead(){
|
||||||
console.log(localStorage.getItem("notf-fav_2"));
|
|
||||||
var multi = localStorage.getItem("multi");
|
var multi = localStorage.getItem("multi");
|
||||||
if (multi) {
|
if (multi) {
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
console.log(key);
|
|
||||||
notfCanceler(key)
|
notfCanceler(key)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
|
||||||
var templete = '';
|
var templete = '';
|
||||||
if(obj[0]){
|
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'));
|
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
|
||||||
}
|
}
|
||||||
|
@ -886,7 +886,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
|
||||||
var datetype = localStorage.getItem("datetype");
|
var datetype = localStorage.getItem("datetype");
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var toot = obj[key];
|
var toot = obj[key];
|
||||||
console.log(toot)
|
console.log(["Parsing",toot])
|
||||||
if(!toot.username){
|
if(!toot.username){
|
||||||
var raw=toot;
|
var raw=toot;
|
||||||
toot=toot.account;
|
toot=toot.account;
|
||||||
|
|
|
@ -25,13 +25,12 @@ function pollCalc(){
|
||||||
var days=$("#days_poll").val();
|
var days=$("#days_poll").val();
|
||||||
var hrs=$("#hours_poll").val();
|
var hrs=$("#hours_poll").val();
|
||||||
var mins=$("#mins_poll").val();
|
var mins=$("#mins_poll").val();
|
||||||
console.log(days*86400+hrs*3600+mins*60)
|
console.log("Poll calc:"+days*86400+hrs*3600+mins*60)
|
||||||
return days*86400+hrs*3600+mins*60;
|
return days*86400+hrs*3600+mins*60;
|
||||||
|
|
||||||
}
|
}
|
||||||
//Vote
|
//Vote
|
||||||
function voteSelMastodon(acct_id,id,to,mul){
|
function voteSelMastodon(acct_id,id,to,mul){
|
||||||
console.log('.vote_'+acct_id+'_'+id+'_'+to);
|
|
||||||
if($('.vote_'+acct_id+'_'+id+'_'+to).hasClass("sel")){
|
if($('.vote_'+acct_id+'_'+id+'_'+to).hasClass("sel")){
|
||||||
$('.vote_'+acct_id+'_'+id+'_'+to).css("background-color","transparent")
|
$('.vote_'+acct_id+'_'+id+'_'+to).css("background-color","transparent")
|
||||||
$('.vote_'+acct_id+'_'+id+'_'+to).removeClass("sel");
|
$('.vote_'+acct_id+'_'+id+'_'+to).removeClass("sel");
|
||||||
|
@ -95,7 +94,7 @@ function voteMastodonrefresh(acct_id,id){
|
||||||
httpreqd.onreadystatechange = function() {
|
httpreqd.onreadystatechange = function() {
|
||||||
if (httpreqd.readyState == 4) {
|
if (httpreqd.readyState == 4) {
|
||||||
var json = httpreqd.response;
|
var json = httpreqd.response;
|
||||||
console.log(json);
|
console.log(["Refresh vote",json]);
|
||||||
if(!json){
|
if(!json){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,6 @@ $repeat = setInterval(function() {
|
||||||
var obj = JSON.parse(voice);
|
var obj = JSON.parse(voice);
|
||||||
if(obj[0]){
|
if(obj[0]){
|
||||||
$synthes.text = obj[0];
|
$synthes.text = obj[0];
|
||||||
console.log($synthes);
|
|
||||||
speechSynthesis.speak($synthes);
|
speechSynthesis.speak($synthes);
|
||||||
obj.splice(0, 1);
|
obj.splice(0, 1);
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
|
|
|
@ -31,7 +31,7 @@ function src(mode) {
|
||||||
}else{
|
}else{
|
||||||
var start = "https://" + domain + "/api/v1/search?q=" + q
|
var start = "https://" + domain + "/api/v1/search?q=" + q
|
||||||
}
|
}
|
||||||
console.log(start)
|
console.log("Try to search at "+start)
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -44,7 +44,7 @@ function src(mode) {
|
||||||
src("v1")
|
src("v1")
|
||||||
return false;
|
return false;
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
console.log(["Search",json]);
|
||||||
//ハッシュタグ
|
//ハッシュタグ
|
||||||
if (json.hashtags[0]) {
|
if (json.hashtags[0]) {
|
||||||
var tags = "";
|
var tags = "";
|
||||||
|
@ -83,14 +83,13 @@ function tsAdd(q){
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
localStorage.setItem("card_" + obj.length,"true");
|
localStorage.setItem("card_" + obj.length,"true");
|
||||||
obj.push(add);
|
obj.push(add);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("column", json);
|
localStorage.setItem("column", json);
|
||||||
parseColumn();
|
parseColumn();
|
||||||
}
|
}
|
||||||
function tootsearch(tlid,q){
|
function tootsearch(tlid,q){
|
||||||
var start = "https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=" + q
|
var start = "https://tootsearch.chotto.moe/api/v1/search?from=0&sort=created_at%3Adesc&q=" + q
|
||||||
console.log(start)
|
console.log("Toot srrach at "+start)
|
||||||
$("#notice_" + tlid).text("tootsearch("+q+")");
|
$("#notice_" + tlid).text("tootsearch("+q+")");
|
||||||
$("#notice_icon_" + tlid).text("search");
|
$("#notice_icon_" + tlid).text("search");
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
|
@ -106,13 +105,10 @@ function tootsearch(tlid,q){
|
||||||
}).then(function(raw) {
|
}).then(function(raw) {
|
||||||
var templete="";
|
var templete="";
|
||||||
var json=raw.hits.hits;
|
var json=raw.hits.hits;
|
||||||
console.log(json);
|
|
||||||
var max_id = raw["hits"].length;
|
var max_id = raw["hits"].length;
|
||||||
for(var i=0;i<json.length;i++){
|
for(var i=0;i<json.length;i++){
|
||||||
var toot = json[i]["_source"];
|
var toot = json[i]["_source"];
|
||||||
console.log(lastid)
|
|
||||||
if(lastid!=toot.uri){
|
if(lastid!=toot.uri){
|
||||||
console.log(toot);
|
|
||||||
if(toot && toot.account){
|
if(toot && toot.account){
|
||||||
templete = templete+parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
|
templete = templete+parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
|
||||||
}
|
}
|
||||||
|
@ -133,7 +129,6 @@ function moreTs(tlid,q){
|
||||||
var sid = $("#timeline_" + tlid + " .ts-marker").last().attr("data-maxid");
|
var sid = $("#timeline_" + tlid + " .ts-marker").last().attr("data-maxid");
|
||||||
moreloading=true;
|
moreloading=true;
|
||||||
var start = "https://tootsearch.chotto.moe/api/v1/search?from="+sid+"&sort=created_at%3Adesc&q=" + q
|
var start = "https://tootsearch.chotto.moe/api/v1/search?from="+sid+"&sort=created_at%3Adesc&q=" + q
|
||||||
console.log(start)
|
|
||||||
$("#notice_" + tlid).text("tootsearch("+q+")");
|
$("#notice_" + tlid).text("tootsearch("+q+")");
|
||||||
$("#notice_icon_" + tlid).text("search");
|
$("#notice_icon_" + tlid).text("search");
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
|
@ -149,13 +144,10 @@ function moreTs(tlid,q){
|
||||||
}).then(function(raw) {
|
}).then(function(raw) {
|
||||||
var templete="";
|
var templete="";
|
||||||
var json=raw.hits.hits;
|
var json=raw.hits.hits;
|
||||||
console.log(json);
|
|
||||||
var max_id = raw["hits"].length;
|
var max_id = raw["hits"].length;
|
||||||
for(var i=0;i<json.length;i++){
|
for(var i=0;i<json.length;i++){
|
||||||
var toot = json[i]["_source"];
|
var toot = json[i]["_source"];
|
||||||
console.log(lastid)
|
|
||||||
if(lastid!=toot.uri){
|
if(lastid!=toot.uri){
|
||||||
console.log(toot);
|
|
||||||
if(toot && toot.account){
|
if(toot && toot.account){
|
||||||
templete = templete+parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
|
templete = templete+parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
|
||||||
}
|
}
|
||||||
|
@ -175,7 +167,6 @@ function moreTs(tlid,q){
|
||||||
function graphDraw(tag){
|
function graphDraw(tag){
|
||||||
var tags="";
|
var tags="";
|
||||||
var his=tag.history;
|
var his=tag.history;
|
||||||
console.log(his);
|
|
||||||
var max=Math.max.apply(null, [his[0].uses,his[1].uses,his[2].uses,his[3].uses,his[4].uses,his[5].uses,his[6].uses]);
|
var max=Math.max.apply(null, [his[0].uses,his[1].uses,his[2].uses,his[3].uses,his[4].uses,his[5].uses,his[6].uses]);
|
||||||
var six=50-(his[6].uses/max*50);
|
var six=50-(his[6].uses/max*50);
|
||||||
var five=50-(his[5].uses/max*50);
|
var five=50-(his[5].uses/max*50);
|
||||||
|
|
|
@ -58,7 +58,7 @@ function favTag(){
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var tag = obj[key];
|
var tag = obj[key];
|
||||||
if(nowPT!=tag){
|
if(nowPT!=tag){
|
||||||
console.log(nowPT+"/"+tag);
|
console.log("stable tags:"+nowPT+"/"+tag);
|
||||||
var ptt=lang.lang_tags_realtime;
|
var ptt=lang.lang_tags_realtime;
|
||||||
var nowon="";
|
var nowon="";
|
||||||
}else{
|
}else{
|
||||||
|
@ -80,7 +80,6 @@ function trendTag(){
|
||||||
var domain="imastodon.net"
|
var domain="imastodon.net"
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/trend_tags"
|
var start = "https://" + domain + "/api/v1/trend_tags"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -7,7 +7,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
//タグとかの場合はカラム追加して描画
|
//タグとかの場合はカラム追加して描画
|
||||||
if (tlid == "add") {
|
if (tlid == "add") {
|
||||||
console.log("add");
|
console.log("add new column");
|
||||||
var newtab = $(".box").length;
|
var newtab = $(".box").length;
|
||||||
var add = {
|
var add = {
|
||||||
domain: acct_id,
|
domain: acct_id,
|
||||||
|
@ -18,7 +18,6 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
localStorage.setItem("card_" + obj.length, "true");
|
localStorage.setItem("card_" + obj.length, "true");
|
||||||
obj.push(add);
|
obj.push(add);
|
||||||
console.log(obj);
|
|
||||||
var json = JSON.stringify(obj);
|
var json = JSON.stringify(obj);
|
||||||
localStorage.setItem("column", json);
|
localStorage.setItem("column", json);
|
||||||
parseColumn();
|
parseColumn();
|
||||||
|
@ -125,14 +124,14 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(start);
|
console.log(["Try to get timeline of "+tlid,start])
|
||||||
fetch(start, i).then(function (response) {
|
fetch(start, i).then(function (response) {
|
||||||
return response.json();
|
return response.json();
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function (json) {
|
}).then(function (json) {
|
||||||
console.log(json)
|
console.log(["Result of getting timeline of "+tlid,json])
|
||||||
$("#landing_" + tlid).hide();
|
$("#landing_" + tlid).hide();
|
||||||
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
|
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
|
||||||
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), type);
|
var mute = getFilterType(JSON.parse(localStorage.getItem("filter_" + acct_id)), type);
|
||||||
|
@ -213,18 +212,15 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
|
||||||
var start = wss +
|
var start = wss +
|
||||||
"/api/v1/streaming/?stream=direct&access_token=" + at;
|
"/api/v1/streaming/?stream=direct&access_token=" + at;
|
||||||
}
|
}
|
||||||
console.log(start);
|
|
||||||
var wsid = websocket.length;
|
var wsid = websocket.length;
|
||||||
localStorage.setItem("wss_" + tlid, wsid);
|
localStorage.setItem("wss_" + tlid, wsid);
|
||||||
websocket[wsid] = new WebSocket(start);
|
websocket[wsid] = new WebSocket(start);
|
||||||
websocket[wsid].onopen = function (mess) {
|
websocket[wsid].onopen = function (mess) {
|
||||||
console.log(tlid + ":Connect Streaming API:" + type);
|
console.table({"tlid":tlid,"type":"Connect Streaming API"+type,"domain":domain,"message":[mess]})
|
||||||
console.log(mess);
|
|
||||||
$("#notice_icon_" + tlid).removeClass("red-text");
|
$("#notice_icon_" + tlid).removeClass("red-text");
|
||||||
}
|
}
|
||||||
websocket[wsid].onmessage = function (mess) {
|
websocket[wsid].onmessage = function (mess) {
|
||||||
console.log(tlid + ":Receive Streaming API:");
|
console.log([tlid + ":Receive Streaming API:",JSON.parse(mess.data)]);
|
||||||
console.log(JSON.parse(mess.data));
|
|
||||||
if (misskey) {
|
if (misskey) {
|
||||||
if (JSON.parse(mess.data).type == "note") {
|
if (JSON.parse(mess.data).type == "note") {
|
||||||
var obj = JSON.parse(mess.data).body;
|
var obj = JSON.parse(mess.data).body;
|
||||||
|
@ -267,7 +263,6 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
|
||||||
} else if (typeA == "update" || typeA == "conversation") {
|
} else if (typeA == "update" || typeA == "conversation") {
|
||||||
localStorage.removeItem("delete");
|
localStorage.removeItem("delete");
|
||||||
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
var obj = JSON.parse(JSON.parse(mess.data).payload);
|
||||||
console.log(obj);
|
|
||||||
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
|
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
|
||||||
if (voice) {
|
if (voice) {
|
||||||
say(obj.content)
|
say(obj.content)
|
||||||
|
@ -315,8 +310,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
websocket[wsid].onclose = function () {
|
websocket[wsid].onclose = function () {
|
||||||
console.log("Closing");
|
console.warn("Closing "+tlid);
|
||||||
console.log(tlid);
|
|
||||||
if (mode == "error") {
|
if (mode == "error") {
|
||||||
$("#notice_icon_" + tlid).addClass("red-text");
|
$("#notice_icon_" + tlid).addClass("red-text");
|
||||||
todo('WebSocket Closed');
|
todo('WebSocket Closed');
|
||||||
|
@ -431,7 +425,6 @@ function moreload(type, tlid) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function (json) {
|
}).then(function (json) {
|
||||||
console.log(json);
|
|
||||||
if (misskey) {
|
if (misskey) {
|
||||||
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
|
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
|
||||||
} else {
|
} else {
|
||||||
|
@ -447,7 +440,7 @@ function moreload(type, tlid) {
|
||||||
}
|
}
|
||||||
//TL差分取得
|
//TL差分取得
|
||||||
function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
|
function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
|
||||||
console.log("sabun")
|
console.log("Get diff of TL"+tlid)
|
||||||
var multi = localStorage.getItem("column");
|
var multi = localStorage.getItem("column");
|
||||||
var obj = JSON.parse(multi);
|
var obj = JSON.parse(multi);
|
||||||
var acct_id = obj[tlid].domain;
|
var acct_id = obj[tlid].domain;
|
||||||
|
@ -540,7 +533,7 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function (json) {
|
}).then(function (json) {
|
||||||
console.log(json);
|
console.log(["Result diff of TL"+tlid,json]);
|
||||||
if (misskey) {
|
if (misskey) {
|
||||||
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
|
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
|
||||||
} else {
|
} else {
|
||||||
|
@ -564,12 +557,12 @@ function tlCloser() {
|
||||||
Object.keys(websocket).forEach(function (tlid) {
|
Object.keys(websocket).forEach(function (tlid) {
|
||||||
if (websocketOld[tlid]) {
|
if (websocketOld[tlid]) {
|
||||||
websocketOld[tlid].close();
|
websocketOld[tlid].close();
|
||||||
console.log("Close Streaming API: Old" + tlid);
|
console.log("%c Close Streaming API: Old" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
if (websocket[0]) {
|
if (websocket[0]) {
|
||||||
console.log(websocket[0]);
|
console.log(websocket[0]);
|
||||||
websocket[tlid].close();
|
websocket[tlid].close();
|
||||||
console.log("Close Streaming API:" + tlid);
|
console.log("%c Close Streaming API:" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -577,7 +570,7 @@ function tlCloser() {
|
||||||
Object.keys(websocketHome).forEach(function (tlid) {
|
Object.keys(websocketHome).forEach(function (tlid) {
|
||||||
if (websocketHome[tlid]) {
|
if (websocketHome[tlid]) {
|
||||||
websocketHome[tlid].close();
|
websocketHome[tlid].close();
|
||||||
console.log("Close Streaming API:MixHome" + tlid);
|
console.log("%c Close Streaming API:Integrated Home" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -585,7 +578,7 @@ function tlCloser() {
|
||||||
Object.keys(websocketLocal).forEach(function (tlid) {
|
Object.keys(websocketLocal).forEach(function (tlid) {
|
||||||
if (websocketLocal[tlid]) {
|
if (websocketLocal[tlid]) {
|
||||||
websocketLocal[tlid].close();
|
websocketLocal[tlid].close();
|
||||||
console.log("Close Streaming API:MixLocal" + tlid);
|
console.log("%c Close Streaming API:Integrated Local" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -593,14 +586,14 @@ function tlCloser() {
|
||||||
Object.keys(websocketNotf).forEach(function (tlid) {
|
Object.keys(websocketNotf).forEach(function (tlid) {
|
||||||
if (websocketNotf[tlid]) {
|
if (websocketNotf[tlid]) {
|
||||||
websocketNotf[tlid].close();
|
websocketNotf[tlid].close();
|
||||||
console.log("Close Streaming API:Notf" + tlid);
|
console.log("%c Close Streaming API:Notf" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
Object.keys(misskeyws).forEach(function (tlid) {
|
Object.keys(misskeyws).forEach(function (tlid) {
|
||||||
if (misskeyws[tlid]) {
|
if (misskeyws[tlid]) {
|
||||||
misskeyws[tlid].close();
|
misskeyws[tlid].close();
|
||||||
console.log("Close Streaming API:Misskey" + tlid);
|
console.log("%c Close Streaming API:Misskey" + tlid,"color:blue");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
misskeyws={}
|
misskeyws={}
|
||||||
|
@ -789,7 +782,7 @@ function strAliveInt() {
|
||||||
setTimeout(strAlive, 10000);
|
setTimeout(strAlive, 10000);
|
||||||
}
|
}
|
||||||
function reconnector(tlid, type, acct_id, data, mode) {
|
function reconnector(tlid, type, acct_id, data, mode) {
|
||||||
console.log("Reconnector:" + mode)
|
console.log("%c Reconnector:" + mode+"(timeline"+tlid+")","color:pink")
|
||||||
if (type == "mix" || type == "integrated" || type == "plus") {
|
if (type == "mix" || type == "integrated" || type == "plus") {
|
||||||
if (localStorage.getItem("voice_" + tlid)) {
|
if (localStorage.getItem("voice_" + tlid)) {
|
||||||
var voice = true;
|
var voice = true;
|
||||||
|
|
|
@ -59,7 +59,6 @@ function imgv(id, key, acct_id) {
|
||||||
$("#imagemodal").css("width",width+"px")
|
$("#imagemodal").css("width",width+"px")
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log("long")
|
|
||||||
$("#imagemodal img").css("width","auto")
|
$("#imagemodal img").css("width","auto")
|
||||||
var widthS=windowH/height*width;
|
var widthS=windowH/height*width;
|
||||||
if(widthS<windowW){
|
if(widthS<windowW){
|
||||||
|
@ -149,7 +148,6 @@ function imgCont(type) {
|
||||||
$("#imagemodal").css("width",width+"px")
|
$("#imagemodal").css("width",width+"px")
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
console.log("long")
|
|
||||||
$("#imagemodal img").css("width","auto")
|
$("#imagemodal img").css("width","auto")
|
||||||
var widthS=windowH/height*width;
|
var widthS=windowH/height*width;
|
||||||
if(widthS<windowW){
|
if(widthS<windowW){
|
||||||
|
@ -167,7 +165,6 @@ function imgCont(type) {
|
||||||
} else {
|
} else {
|
||||||
$("#image-next").prop("disabled", false);
|
$("#image-next").prop("disabled", false);
|
||||||
}
|
}
|
||||||
console.log("#" + id + "-image-" + (key * 1 - 1));
|
|
||||||
if ($("#" + id + "-image-" + (key * 1 - 1)).length === 0) {
|
if ($("#" + id + "-image-" + (key * 1 - 1)).length === 0) {
|
||||||
$("#image-prev").prop("disabled", true);
|
$("#image-prev").prop("disabled", true);
|
||||||
} else {
|
} else {
|
||||||
|
@ -231,7 +228,6 @@ function zoom(z) {
|
||||||
$(this).on('touchmove', function(event) {
|
$(this).on('touchmove', function(event) {
|
||||||
if ($(target).data('down') === true) {
|
if ($(target).data('down') === true) {
|
||||||
// スクロール
|
// スクロール
|
||||||
console.log($(target).data('x'));
|
|
||||||
target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') -
|
target.scrollLeft($(target).data('scrollLeft') + $(target).data('x') -
|
||||||
getX(event));
|
getX(event));
|
||||||
target.scrollTop($(target).data('scrollTop') + $(target).data('y') -
|
target.scrollTop($(target).data('scrollTop') + $(target).data('y') -
|
||||||
|
@ -284,7 +280,7 @@ function dlImg(){
|
||||||
}
|
}
|
||||||
ipc.send('general-dl', [url,save,false]);
|
ipc.send('general-dl', [url,save,false]);
|
||||||
ipc.on('general-dl-prog', function (event, arg) {
|
ipc.on('general-dl-prog', function (event, arg) {
|
||||||
console.log(arg);
|
console.log("Progress: "+arg);
|
||||||
})
|
})
|
||||||
ipc.on('general-dl-message', function (event, arg) {
|
ipc.on('general-dl-message', function (event, arg) {
|
||||||
var argC=arg.replace(/\\/g,"\\\\")+"\\\\.";
|
var argC=arg.replace(/\\/g,"\\\\")+"\\\\.";
|
||||||
|
|
|
@ -21,7 +21,7 @@ $('.type').click(function() {
|
||||||
})
|
})
|
||||||
//最初、カラム変更時に発火
|
//最初、カラム変更時に発火
|
||||||
function parseColumn(dontclose) {
|
function parseColumn(dontclose) {
|
||||||
console.log("parse");
|
console.log("%c Parse column","color:red;font-size:125%");
|
||||||
var size = localStorage.getItem("size");
|
var size = localStorage.getItem("size");
|
||||||
if (size) {
|
if (size) {
|
||||||
$("#timeline-container").css("font-size", size + "px");
|
$("#timeline-container").css("font-size", size + "px");
|
||||||
|
@ -60,7 +60,7 @@ function parseColumn(dontclose) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
var acctlist=obj;
|
var acctlist=obj;
|
||||||
console.log(obj);
|
console.table(obj);
|
||||||
/*var xed=localStorage.getItem("xed");
|
/*var xed=localStorage.getItem("xed");
|
||||||
if(xed){
|
if(xed){
|
||||||
xpand();
|
xpand();
|
||||||
|
@ -272,7 +272,6 @@ function parseColumn(dontclose) {
|
||||||
}
|
}
|
||||||
function checkStr(type, data, acct_id, key, delc,voice){
|
function checkStr(type, data, acct_id, key, delc,voice){
|
||||||
if($('#notice_icon_' + key).hasClass("red-text") && type!="notf" && type!="mix"){
|
if($('#notice_icon_' + key).hasClass("red-text") && type!="notf" && type!="mix"){
|
||||||
console.log("sabun-get")
|
|
||||||
goTop(key);
|
goTop(key);
|
||||||
tlDiff(type, data, acct_id, key, delc,voice,"");
|
tlDiff(type, data, acct_id, key, delc,voice,"");
|
||||||
}else{
|
}else{
|
||||||
|
@ -366,7 +365,6 @@ function removeColumn(tlid) {
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
ipc.send('column-del', "");
|
ipc.send('column-del', "");
|
||||||
ipc.on('column-del-reply', function (event, arg) {
|
ipc.on('column-del-reply', function (event, arg) {
|
||||||
console.log(arg);
|
|
||||||
if(arg===1){
|
if(arg===1){
|
||||||
localStorage.removeItem("card_" + tlid);
|
localStorage.removeItem("card_" + tlid);
|
||||||
obj.splice(tlid, 1);
|
obj.splice(tlid, 1);
|
||||||
|
|
|
@ -28,7 +28,7 @@ function scrollck() {
|
||||||
var scrt = $(this).find(".tl").height() - $(window).height();
|
var scrt = $(this).find(".tl").height() - $(window).height();
|
||||||
var scr = $(this).scrollTop();
|
var scr = $(this).scrollTop();
|
||||||
if (scr > scrt) {
|
if (scr > scrt) {
|
||||||
console.log("kicked");
|
console.log("kicked more loading:"+tlid);
|
||||||
moreload('', tlid);
|
moreload('', tlid);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -44,7 +44,6 @@ function goColumn(key){
|
||||||
$("#sort-box").addClass("hide");
|
$("#sort-box").addClass("hide");
|
||||||
$("#sort-box").removeClass("show");
|
$("#sort-box").removeClass("show");
|
||||||
if($('[tlid='+key+']').length){
|
if($('[tlid='+key+']').length){
|
||||||
console.log($('[tlid='+key+']').offset().left);
|
|
||||||
$("#timeline-container").animate({scrollLeft:$("#timeline-container").scrollLeft()+$('[tlid='+key+']').offset().left});
|
$("#timeline-container").animate({scrollLeft:$("#timeline-container").scrollLeft()+$('[tlid='+key+']').offset().left});
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -141,7 +141,6 @@ function climute(){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var templete;
|
var templete;
|
||||||
console.log(obj)
|
|
||||||
Object.keys(obj).forEach(function(key) {
|
Object.keys(obj).forEach(function(key) {
|
||||||
var cli = obj[key];
|
var cli = obj[key];
|
||||||
var list = key * 1 + 1;
|
var list = key * 1 + 1;
|
||||||
|
@ -233,7 +232,6 @@ function exportSettings(){
|
||||||
properties: ['openFile', 'createDirectory'],
|
properties: ['openFile', 'createDirectory'],
|
||||||
defaultPath: "export.thedeskconfigv2"
|
defaultPath: "export.thedeskconfigv2"
|
||||||
}, (savedFiles) => {
|
}, (savedFiles) => {
|
||||||
console.log(savedFiles);
|
|
||||||
if(!savedFiles){
|
if(!savedFiles){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +292,6 @@ function exportSettings(){
|
||||||
var tagarr = localStorage.getItem("tag");
|
var tagarr = localStorage.getItem("tag");
|
||||||
var favtag = JSON.parse(tagarr);
|
var favtag = JSON.parse(tagarr);
|
||||||
exp.favoriteTags=favtag;
|
exp.favoriteTags=favtag;
|
||||||
console.log(exp);
|
|
||||||
ipc.send('export', [savedFiles,JSON.stringify(exp)]);
|
ipc.send('export', [savedFiles,JSON.stringify(exp)]);
|
||||||
alert("Done.")
|
alert("Done.")
|
||||||
//cards
|
//cards
|
||||||
|
@ -316,7 +313,6 @@ function importSettings(){
|
||||||
{name: 'TheDesk Config', extensions: ['thedeskconfig','thedeskconfigv2']},
|
{name: 'TheDesk Config', extensions: ['thedeskconfig','thedeskconfigv2']},
|
||||||
]
|
]
|
||||||
}, (fileNames) => {
|
}, (fileNames) => {
|
||||||
console.log(fileNames);
|
|
||||||
if(!fileNames){
|
if(!fileNames){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -363,7 +359,6 @@ function importSettings(){
|
||||||
//Version 1
|
//Version 1
|
||||||
localStorage.setItem("theme",obj.theme);
|
localStorage.setItem("theme",obj.theme);
|
||||||
if(obj.width){
|
if(obj.width){
|
||||||
console.log(obj.width)
|
|
||||||
localStorage.setItem("width",obj.width);
|
localStorage.setItem("width",obj.width);
|
||||||
}
|
}
|
||||||
if(obj.font){
|
if(obj.font){
|
||||||
|
@ -552,7 +547,6 @@ function deleteIt(){
|
||||||
function ctLoad(){
|
function ctLoad(){
|
||||||
ipc.send('theme-json-list', "");
|
ipc.send('theme-json-list', "");
|
||||||
ipc.on('theme-json-list-response', function (event, args) {
|
ipc.on('theme-json-list-response', function (event, args) {
|
||||||
console.log(args);
|
|
||||||
var templete="";
|
var templete="";
|
||||||
Object.keys(args).forEach(function(key) {
|
Object.keys(args).forEach(function(key) {
|
||||||
var theme = args[key];
|
var theme = args[key];
|
||||||
|
@ -596,7 +590,6 @@ function custom(){
|
||||||
$("#delTheme").removeClass("disabled")
|
$("#delTheme").removeClass("disabled")
|
||||||
ipc.send('theme-json-request', id);
|
ipc.send('theme-json-request', id);
|
||||||
ipc.on('theme-json-response', function (event, args) {
|
ipc.on('theme-json-response', function (event, args) {
|
||||||
console.log(args);
|
|
||||||
$("#custom_name").val(args.name);
|
$("#custom_name").val(args.name);
|
||||||
$("#custom_desc").val(args.desc);
|
$("#custom_desc").val(args.desc);
|
||||||
$("#"+args.base).prop("checked", true);
|
$("#"+args.base).prop("checked", true);
|
||||||
|
@ -633,7 +626,6 @@ function customImp(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function hardwareAcceleration(had){
|
function hardwareAcceleration(had){
|
||||||
console.log("ha");
|
|
||||||
ipc.send('ha', had);
|
ipc.send('ha', had);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ function Scap(type, data) {
|
||||||
}else if (type == "tootsearch") {
|
}else if (type == "tootsearch") {
|
||||||
return "tootsearch(" + data + ")"
|
return "tootsearch(" + data + ")"
|
||||||
}else{
|
}else{
|
||||||
console.log(type);
|
console.error("unknown timeline type: "+type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ function nowplaying(mode){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
console.table(json);
|
||||||
if(json.length<1){
|
if(json.length<1){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ function nowplaying(mode){
|
||||||
console.error(arg);
|
console.error(arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log(arg);
|
console.table(arg);
|
||||||
var content=localStorage.getItem("np-temp");
|
var content=localStorage.getItem("np-temp");
|
||||||
if(!content || content=="" || content=="null"){
|
if(!content || content=="" || content=="null"){
|
||||||
var content="#NowPlaying {song} / {album} / {artist}\n{url}";
|
var content="#NowPlaying {song} / {album} / {artist}\n{url}";
|
||||||
|
|
|
@ -66,7 +66,6 @@ function trendTagonTip(){
|
||||||
var domain="imastodon.net"
|
var domain="imastodon.net"
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/trend_tags"
|
var start = "https://" + domain + "/api/v1/trend_tags"
|
||||||
console.log(start)
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -109,7 +108,6 @@ function spotifytips(){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
var ms=json.progress_ms;
|
var ms=json.progress_ms;
|
||||||
var last=1000-ms%1000;
|
var last=1000-ms%1000;
|
||||||
var item=json.item;
|
var item=json.item;
|
||||||
|
|
|
@ -538,9 +538,8 @@ function showFrl(more, acct_id) {
|
||||||
$("#his-follow-recom-contents").html(lang.lang_details_nodata+"("+lang.lang_hisdata_frcreq+")<br>");
|
$("#his-follow-recom-contents").html(lang.lang_details_nodata+"("+lang.lang_hisdata_frcreq+")<br>");
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if(!json[0]){
|
if(!json[0]){
|
||||||
console.log("No data");
|
console.warn("No suggestions(recommend) data");
|
||||||
templete=lang.lang_details_nodata+"("+lang.lang_hisdata_frcwarn+")<br>";
|
templete=lang.lang_details_nodata+"("+lang.lang_hisdata_frcwarn+")<br>";
|
||||||
}else{
|
}else{
|
||||||
var templete = userparse(json,'',acct_id);
|
var templete = userparse(json,'',acct_id);
|
||||||
|
@ -608,7 +607,6 @@ function showMat() {
|
||||||
var acct_id=$("#his-data").attr("use-acct");
|
var acct_id=$("#his-data").attr("use-acct");
|
||||||
full=full.split("@");
|
full=full.split("@");
|
||||||
var start = "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-filtered-api.cgi?"+full[1]+"+" + full[0];
|
var start = "https://vinayaka.distsn.org/cgi-bin/vinayaka-user-match-filtered-api.cgi?"+full[1]+"+" + full[0];
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -621,7 +619,6 @@ function showMat() {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
var templete="";
|
var templete="";
|
||||||
Object.keys(json).forEach(function(key) {
|
Object.keys(json).forEach(function(key) {
|
||||||
var user = json[key];
|
var user = json[key];
|
||||||
|
|
|
@ -30,7 +30,7 @@ function imgChange(imgfile, target) {
|
||||||
var acct_id = $('#his-data').attr("use-acct");
|
var acct_id = $('#his-data').attr("use-acct");
|
||||||
todo("アップロードしています")
|
todo("アップロードしています")
|
||||||
if (!imgfile.files.length) {
|
if (!imgfile.files.length) {
|
||||||
console.log("No Img");
|
console.warn("No Image to upload");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var file = imgfile.files[0];
|
var file = imgfile.files[0];
|
||||||
|
@ -52,7 +52,6 @@ function imgChange(imgfile, target) {
|
||||||
httpreq.onreadystatechange = function() {
|
httpreq.onreadystatechange = function() {
|
||||||
if (httpreq.readyState === 4) {
|
if (httpreq.readyState === 4) {
|
||||||
var json = httpreq.response;
|
var json = httpreq.response;
|
||||||
console.log(json);
|
|
||||||
$('#his-data').modal('close');
|
$('#his-data').modal('close');
|
||||||
todc();
|
todc();
|
||||||
localStorage.removeItem("image");
|
localStorage.removeItem("image");
|
||||||
|
|
|
@ -19,7 +19,7 @@ function udgEx(user,acct_id){
|
||||||
if(acct_id=="main"){
|
if(acct_id=="main"){
|
||||||
acct_id = localStorage.getItem("main");
|
acct_id = localStorage.getItem("main");
|
||||||
}
|
}
|
||||||
console.log(user);
|
console.log("Get user data of "+user);
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
if(localStorage.getItem("mode_" + domain)=="misskey"){ return false; }
|
if(localStorage.getItem("mode_" + domain)=="misskey"){ return false; }
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
|
@ -36,7 +36,6 @@ function udgEx(user,acct_id){
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
if(json.accounts){
|
if(json.accounts){
|
||||||
var id=json.accounts[0].id;
|
var id=json.accounts[0].id;
|
||||||
udg(id,acct_id);
|
udg(id,acct_id);
|
||||||
|
@ -52,7 +51,6 @@ function udg(user, acct_id) {
|
||||||
reset();
|
reset();
|
||||||
if (!user) {
|
if (!user) {
|
||||||
user = localStorage.getItem("user-id_"+acct_id);
|
user = localStorage.getItem("user-id_"+acct_id);
|
||||||
console.log(user);
|
|
||||||
}
|
}
|
||||||
todo("User Data Loading...");
|
todo("User Data Loading...");
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
@ -62,7 +60,6 @@ function udg(user, acct_id) {
|
||||||
}
|
}
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/v1/accounts/" + user;
|
var start = "https://" + domain + "/api/v1/accounts/" + user;
|
||||||
console.log(start);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -75,7 +72,6 @@ function udg(user, acct_id) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
//一つ前のユーザーデータ
|
//一つ前のユーザーデータ
|
||||||
if (!localStorage.getItem("history")){
|
if (!localStorage.getItem("history")){
|
||||||
$("#his-history-btn").prop("disabled",true);
|
$("#his-history-btn").prop("disabled",true);
|
||||||
|
@ -128,7 +124,6 @@ function udg(user, acct_id) {
|
||||||
//var tags = '<a onclick="tl(\'tag\',\'$1\',' + acct_id +',\'add\')" class="pointer parsed">#$1</a>';
|
//var tags = '<a onclick="tl(\'tag\',\'$1\',' + acct_id +',\'add\')" class="pointer parsed">#$1</a>';
|
||||||
//var mens = '<a onclick="udgEx(\'$1\',' + acct_id +')" class="pointer parsed">@$1</a>';
|
//var mens = '<a onclick="udgEx(\'$1\',' + acct_id +')" class="pointer parsed">@$1</a>';
|
||||||
//note=note.replace(/#(\S+)/gi, tags)
|
//note=note.replace(/#(\S+)/gi, tags)
|
||||||
console.log(note)
|
|
||||||
//note=note.replace(/\s@([a-zA-Z_0-9@.-]+)/gi, mens)
|
//note=note.replace(/\s@([a-zA-Z_0-9@.-]+)/gi, mens)
|
||||||
$("#his-name").html(dis_name);
|
$("#his-name").html(dis_name);
|
||||||
$("#his-acct").text(json.acct);
|
$("#his-acct").text(json.acct);
|
||||||
|
@ -215,7 +210,6 @@ function misskeyUdg(user, acct_id) {
|
||||||
reset();
|
reset();
|
||||||
if (!user) {
|
if (!user) {
|
||||||
user = localStorage.getItem("user-id_"+acct_id);
|
user = localStorage.getItem("user-id_"+acct_id);
|
||||||
console.log(user);
|
|
||||||
}
|
}
|
||||||
todo("User Data Loading...");
|
todo("User Data Loading...");
|
||||||
var domain = localStorage.getItem("domain_" + acct_id);
|
var domain = localStorage.getItem("domain_" + acct_id);
|
||||||
|
@ -225,7 +219,6 @@ function misskeyUdg(user, acct_id) {
|
||||||
}
|
}
|
||||||
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
var at = localStorage.getItem("acct_"+ acct_id + "_at");
|
||||||
var start = "https://" + domain + "/api/users/show";
|
var start = "https://" + domain + "/api/users/show";
|
||||||
console.log(user);
|
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
|
@ -241,7 +234,6 @@ function misskeyUdg(user, acct_id) {
|
||||||
todo(error);
|
todo(error);
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}).then(function(json) {
|
}).then(function(json) {
|
||||||
console.log(json);
|
|
||||||
//一つ前のユーザーデータ
|
//一つ前のユーザーデータ
|
||||||
if (!localStorage.getItem("history")){
|
if (!localStorage.getItem("history")){
|
||||||
$("#his-history-btn").prop("disabled",true);
|
$("#his-history-btn").prop("disabled",true);
|
||||||
|
@ -340,7 +332,6 @@ function historyShow(){
|
||||||
function profShow(){
|
function profShow(){
|
||||||
var acct_id = $("#post-acct-sel").val();
|
var acct_id = $("#post-acct-sel").val();
|
||||||
var user = localStorage.getItem("user-id_"+acct_id);
|
var user = localStorage.getItem("user-id_"+acct_id);
|
||||||
console.log("user-id_"+acct_id+":"+user);
|
|
||||||
udg(user, acct_id)
|
udg(user, acct_id)
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
|
@ -665,6 +665,10 @@
|
||||||
・フォローリクエストの許可/拒否ができるように。<br>
|
・フォローリクエストの許可/拒否ができるように。<br>
|
||||||
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
||||||
<br>
|
<br>
|
||||||
|
<h5>ThinkingDeskラベル</h5>
|
||||||
|
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
|
||||||
|
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
|
||||||
|
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
|
||||||
</div>
|
</div>
|
||||||
<div id="release-en" style="display:none">
|
<div id="release-en" style="display:none">
|
||||||
<h5>Let's make it native!</h5>
|
<h5>Let's make it native!</h5>
|
||||||
|
@ -877,12 +881,16 @@
|
||||||
</a> |
|
</a> |
|
||||||
<a onclick="bottomReverse()" class="nex waves-effect">
|
<a onclick="bottomReverse()" class="nex waves-effect">
|
||||||
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>Toot button layout reverse
|
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>Toot button layout reverse
|
||||||
|
</a> |
|
||||||
|
<a onclick="openRN()" class="nex waves-effect">
|
||||||
|
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<!--TLのTL-->
|
<!--TLのTL-->
|
||||||
<div id="timeline-container">
|
<div id="timeline-container">
|
||||||
<div id="something-wrong">
|
<div id="something-wrong">
|
||||||
|
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
|
||||||
<div>Internal error: please clear all data(at setting page) <b>All data will be deleted.</b></div>
|
<div>Internal error: please clear all data(at setting page) <b>All data will be deleted.</b></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,6 +113,7 @@ function skipper(){
|
||||||
}
|
}
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
|
const shell=electron.shell;
|
||||||
verck();
|
verck();
|
||||||
function update(sel){
|
function update(sel){
|
||||||
$("#box").toggleClass("show");
|
$("#box").toggleClass("show");
|
||||||
|
@ -158,7 +159,7 @@ function update(sel){
|
||||||
}
|
}
|
||||||
}else if(sel=="mac"){
|
}else if(sel=="mac"){
|
||||||
var url=json["mac"];
|
var url=json["mac"];
|
||||||
var file="TheDesk-darwin-x64.zip";
|
shell.openExternal(url);
|
||||||
}
|
}
|
||||||
ipc.send('download-btn', [url,file]);
|
ipc.send('download-btn', [url,file]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -665,6 +665,10 @@
|
||||||
・フォローリクエストの許可/拒否ができるように。<br>
|
・フォローリクエストの許可/拒否ができるように。<br>
|
||||||
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
||||||
<br>
|
<br>
|
||||||
|
<h5>ThinkingDeskラベル</h5>
|
||||||
|
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
|
||||||
|
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
|
||||||
|
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
|
||||||
</div>
|
</div>
|
||||||
<div id="release-en" style="display:none">
|
<div id="release-en" style="display:none">
|
||||||
<h5>Let's make it native!</h5>
|
<h5>Let's make it native!</h5>
|
||||||
|
@ -877,12 +881,16 @@
|
||||||
</a> |
|
</a> |
|
||||||
<a onclick="bottomReverse()" class="nex waves-effect">
|
<a onclick="bottomReverse()" class="nex waves-effect">
|
||||||
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>トゥートボタンの左右入れ替え
|
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>トゥートボタンの左右入れ替え
|
||||||
|
</a> |
|
||||||
|
<a onclick="openRN()" class="nex waves-effect">
|
||||||
|
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<!--TLのTL-->
|
<!--TLのTL-->
|
||||||
<div id="timeline-container">
|
<div id="timeline-container">
|
||||||
<div id="something-wrong">
|
<div id="something-wrong">
|
||||||
|
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
|
||||||
<div>内部エラーです。再読込して治らない場合は初期化(全データ削除)をしてください。(事前に設定をエクスポートしておくことをおすすめします。)</div>
|
<div>内部エラーです。再読込して治らない場合は初期化(全データ削除)をしてください。(事前に設定をエクスポートしておくことをおすすめします。)</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,6 +113,7 @@ function skipper(){
|
||||||
}
|
}
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
|
const shell=electron.shell;
|
||||||
verck();
|
verck();
|
||||||
function update(sel){
|
function update(sel){
|
||||||
$("#box").toggleClass("show");
|
$("#box").toggleClass("show");
|
||||||
|
@ -158,7 +159,7 @@ function update(sel){
|
||||||
}
|
}
|
||||||
}else if(sel=="mac"){
|
}else if(sel=="mac"){
|
||||||
var url=json["mac"];
|
var url=json["mac"];
|
||||||
var file="TheDesk-darwin-x64.zip";
|
shell.openExternal(url);
|
||||||
}
|
}
|
||||||
ipc.send('download-btn', [url,file]);
|
ipc.send('download-btn', [url,file]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -665,6 +665,10 @@
|
||||||
・フォローリクエストの許可/拒否ができるように。<br>
|
・フォローリクエストの許可/拒否ができるように。<br>
|
||||||
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
||||||
<br>
|
<br>
|
||||||
|
<h5>ThinkingDeskラベル</h5>
|
||||||
|
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
|
||||||
|
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
|
||||||
|
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
|
||||||
</div>
|
</div>
|
||||||
<div id="release-en" style="display:none">
|
<div id="release-en" style="display:none">
|
||||||
<h5>Let's make it native!</h5>
|
<h5>Let's make it native!</h5>
|
||||||
|
@ -877,12 +881,16 @@
|
||||||
</a> |
|
</a> |
|
||||||
<a onclick="bottomReverse()" class="nex waves-effect">
|
<a onclick="bottomReverse()" class="nex waves-effect">
|
||||||
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>@@reverse@@
|
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>@@reverse@@
|
||||||
|
</a> |
|
||||||
|
<a onclick="openRN()" class="nex waves-effect">
|
||||||
|
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<!--TLのTL-->
|
<!--TLのTL-->
|
||||||
<div id="timeline-container">
|
<div id="timeline-container">
|
||||||
<div id="something-wrong">
|
<div id="something-wrong">
|
||||||
|
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
|
||||||
<div>@@helloTheDesk@@</div>
|
<div>@@helloTheDesk@@</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,6 +113,7 @@ function skipper(){
|
||||||
}
|
}
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
|
const shell=electron.shell;
|
||||||
verck();
|
verck();
|
||||||
function update(sel){
|
function update(sel){
|
||||||
$("#box").toggleClass("show");
|
$("#box").toggleClass("show");
|
||||||
|
@ -158,7 +159,7 @@ function update(sel){
|
||||||
}
|
}
|
||||||
}else if(sel=="mac"){
|
}else if(sel=="mac"){
|
||||||
var url=json["mac"];
|
var url=json["mac"];
|
||||||
var file="TheDesk-darwin-x64.zip";
|
shell.openExternal(url);
|
||||||
}
|
}
|
||||||
ipc.send('download-btn', [url,file]);
|
ipc.send('download-btn', [url,file]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -665,6 +665,10 @@
|
||||||
・フォローリクエストの許可/拒否ができるように。<br>
|
・フォローリクエストの許可/拒否ができるように。<br>
|
||||||
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
・起動時に通知のストリーミングにつながらない不具合を修正<br>
|
||||||
<br>
|
<br>
|
||||||
|
<h5>ThinkingDeskラベル</h5>
|
||||||
|
<img src="../../img/thinkingdesk.png" style="width:100px;" draggable="false"><br>
|
||||||
|
手作りマットラベル。貼ってはがせる。300円なのでポイントの余りでどうぞ。<br>
|
||||||
|
<a href="https://item.mercari.com/jp/m822743330" target="_blank">メルカリ</a>へ。
|
||||||
</div>
|
</div>
|
||||||
<div id="release-en" style="display:none">
|
<div id="release-en" style="display:none">
|
||||||
<h5>Let's make it native!</h5>
|
<h5>Let's make it native!</h5>
|
||||||
|
@ -877,12 +881,16 @@
|
||||||
</a> |
|
</a> |
|
||||||
<a onclick="bottomReverse()" class="nex waves-effect">
|
<a onclick="bottomReverse()" class="nex waves-effect">
|
||||||
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>crwdns517:0crwdne517:0
|
<i class="material-icons" style="font-size: 1rem;">swap_horiz</i>crwdns517:0crwdne517:0
|
||||||
|
</a> |
|
||||||
|
<a onclick="openRN()" class="nex waves-effect">
|
||||||
|
<i class="material-icons" style="font-size: 1rem;">new_releases</i>Release Note
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<!--TLのTL-->
|
<!--TLのTL-->
|
||||||
<div id="timeline-container">
|
<div id="timeline-container">
|
||||||
<div id="something-wrong">
|
<div id="something-wrong">
|
||||||
|
<img src="" style="width:150px;margin:5px;display:none;" draggable="false">
|
||||||
<div>crwdns511:0crwdne511:0</div>
|
<div>crwdns511:0crwdne511:0</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -113,6 +113,7 @@ function skipper(){
|
||||||
}
|
}
|
||||||
var electron = require("electron");
|
var electron = require("electron");
|
||||||
var ipc = electron.ipcRenderer;
|
var ipc = electron.ipcRenderer;
|
||||||
|
const shell=electron.shell;
|
||||||
verck();
|
verck();
|
||||||
function update(sel){
|
function update(sel){
|
||||||
$("#box").toggleClass("show");
|
$("#box").toggleClass("show");
|
||||||
|
@ -158,7 +159,7 @@ function update(sel){
|
||||||
}
|
}
|
||||||
}else if(sel=="mac"){
|
}else if(sel=="mac"){
|
||||||
var url=json["mac"];
|
var url=json["mac"];
|
||||||
var file="TheDesk-darwin-x64.zip";
|
shell.openExternal(url);
|
||||||
}
|
}
|
||||||
ipc.send('download-btn', [url,file]);
|
ipc.send('download-btn', [url,file]);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue
Block a user