This commit is contained in:
Cutls
2019-05-19 15:17:05 +09:00
parent 3cde6d0bff
commit d3ff1aa17a
50 changed files with 187 additions and 281 deletions

View File

@@ -170,9 +170,7 @@ function additionalIndv(tlid, acct_id, id) {
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
//このリンク鳥やんけ、ってとき
console.log(json.provider_name);
if (json.provider_name=="Twitter"){
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">';
@@ -243,7 +241,6 @@ function mov(id,tlid,type){
}else{
var tlide="[tlid="+tlid+"]";
}
console.log(tlid)
var mouseover=localStorage.getItem("mouseover");
if(!mouseover){
mouseover="";

View File

@@ -40,7 +40,7 @@ function details(id, acct_id, tlid, mode) {
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
console.log(["Toot data:",json]);
if(!$("#timeline_"+tlid+" #pub_" + id).length){
var html = parse([json], '', acct_id);
$("#toot-this").html(html);
@@ -208,7 +208,6 @@ function context(id, acct_id) {
}).then(function(json) {
if(localStorage.getItem("mode_" + domain)=="misskey"){
json.reverse();
console.log(json);
var templete = misskeyParse(json, '', acct_id,"","",[]);
$("#toot-reply").html(templete);
$("#toot-reply .hide").html(lang.lang_details_filtered);
@@ -482,7 +481,7 @@ function staCopy(id){
html = html.replace(/<br\s?\/?>/, "\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=$.strip_tags(html);
if(execCopy(html)){
@@ -505,7 +504,7 @@ function trans(tar,to){
}
$("#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
console.log(exec);
console.log("Try to translate from "+tar+" to "+to+" at "+exec);
fetch(exec, {
method: 'GET',
}).then(function(response) {

View File

@@ -57,7 +57,6 @@ function dmmore(tlid){
}
//DMオブジェクトパーサー(トゥート)
function dmListParse(obj, mix, acct_id, tlid, popup, mutefilter) {
console.log(obj);
var templete = '';
if(obj[0]){
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));

View File

@@ -114,7 +114,6 @@ function filter(){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -127,7 +126,6 @@ function filter(){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
if (json) {
var filters = "";
Object.keys(json).forEach(function(key) {
@@ -167,7 +165,6 @@ function makeNewFilter(){
if($("#conv_filter:checked").val()){
cont.push("thread");
}
console.log(cont);
if(!cont.length){
$("#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 at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters/"+id
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -248,7 +244,6 @@ function filterEdit(id,acct_id){
todo(error);
console.error(error);
}).then(function(json) {
console.log(json);
if (json) {
var now = new Date() ;
now = now.getTime() ;
@@ -297,7 +292,6 @@ function getFilter(acct_id){
var at = localStorage.getItem("acct_"+ acct_id + "_at");
if(localStorage.getItem("mode_" + domain)!="misskey"){
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -341,7 +335,6 @@ function filterUpdate(acct_id){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/filters"
console.log(start)
fetch(start, {
method: 'GET',
headers: {

View File

@@ -40,7 +40,6 @@ function list(){
});
}else{
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -75,7 +74,6 @@ function makeNewList(){
var at = localStorage.getItem("acct_"+ acct_id + "_at");
if(localStorage.getItem("mode_" + domain)!="misskey"){
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -93,7 +91,6 @@ function makeNewList(){
}
}else{
var start = "https://" + domain + "/api/users/lists/create"
console.log(start)
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -119,7 +116,6 @@ function listUser(id,acct_id){
var domain = localStorage.getItem("domain_" + acct_id);
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/lists/"+id+"/accounts"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -149,7 +145,6 @@ function hisList(user,acct_id){
var at = localStorage.getItem("acct_"+ acct_id + "_at");
if(localStorage.getItem("mode_" + domain)!="misskey"){
var start = "https://" + domain + "/api/v1/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -175,7 +170,6 @@ function hisList(user,acct_id){
}
});
var start = "https://" + domain + "/api/v1/accounts/"+user+"/lists"
console.log(start)
fetch(start, {
method: 'GET',
headers: {
@@ -245,7 +239,6 @@ function listAdd(id,user,acct_id){
account_ids: [user]
}
}
console.log(start)
var httpreq = new XMLHttpRequest();
httpreq.open('POST', start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');
@@ -277,7 +270,6 @@ function listRemove(id,user,acct_id){
account_ids: [user]
}
}
console.log(start)
var httpreq = new XMLHttpRequest();
httpreq.open(method, start, true);
httpreq.setRequestHeader('Content-Type', 'application/json');

View File

@@ -857,7 +857,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
//オブジェクトパーサー(ユーザーデータ)
function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
console.log(obj)
console.log(["Parse them ",obj])
if (popup > 0 || popup == -1) {
} else {
@@ -984,15 +984,14 @@ function connectMisskey(acct_id) {
localStorage.setItem("misskey_wss_" + acct_id, wsid);
misskeyws[wsid] = new WebSocket(start);
misskeyws[wsid].onopen = function (mess) {
console.log(tlid + ":Connect Streaming API:"+domain);
console.log(mess);
console.table({"tlid":tlid,"type":"Connect Streaming API","domain":domain,"message":[mess]})
misskeywsstate[wsid]=true
//$("#notice_icon_" + tlid).removeClass("red-text");
var send='{"type":"connect","body":{"channel":"main","id":"notf:'+acct_id+'"}}'
misskeyws[wsid].send(send)
}
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 obj=data.body.body
@@ -1010,7 +1009,7 @@ function connectMisskey(acct_id) {
templete = misskeyUserparse([obj.body], 'notf', acct_id, 'notf', popup);
}
if(JSON.parse(mess.data).body.type=="reaction"){
console.log("refresh")
console.log("reaction refresh")
reactRefresh(acct_id,obj.body.note.id)
}
if(!$("div[data-notfIndv=" + acct_id +"_"+obj.body.id+"]").length){
@@ -1048,7 +1047,6 @@ function connectMisskey(acct_id) {
jQuery("time.timeago").timeago();
}else if (data.type == "noteUpdated") {
if(data.body.type=="reacted"){
console.log(data.body.id)
reactRefresh(acct_id,data.body.id)
}else if(data.body.type=="deleted"){
$("#pub_"+data.body.id).hide();
@@ -1058,15 +1056,14 @@ function connectMisskey(acct_id) {
}
}
misskeyws[wsid].onerror = function (error) {
console.error("Error closing");
console.error("Error closing "+tlid);
console.error(error);
misskeywsstate[wsid]=false
connectMisskey(acct_id)
return false;
};
misskeyws[wsid].onclose = function () {
console.log("Closing");
console.log(tlid);
console.warn("Closing "+tlid);
misskeywsstate[wsid]=false
connectMisskey(acct_id)
return false;

View File

@@ -1,6 +1,5 @@
//Integrated TL
function mixtl(acct_id, tlid, type,delc,voice) {
console.log(delc);
localStorage.removeItem("morelock")
localStorage.setItem("now", type);
todo("Integrated TL Loading...(Local)");
@@ -94,21 +93,18 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
websocketLocal[wslid] = new WebSocket(startLocal);
websocketHome[wshid].onopen = function(mess) {
localStorage.setItem("wssH_" + tlid, wshid);
console.log(tlid + ":Connect Streaming API(Integrated:Home)");
console.log(mess);
console.table({"tlid":tlid,"type":"Connect Streaming API(Integrated:Home)","domain":domain,"message":mess})
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocketLocal[wslid].onopen = function(mess) {
localStorage.setItem("wssL_" + tlid, wslid);
console.log(tlid + ":Connect Streaming API(Integrated:Local)");
console.log(mess);
console.table({"tlid":tlid,"type":"Connect Streaming API(Integrated:Local)","domain":domain,"message":mess})
$("#notice_icon_" + tlid).removeClass("red-text");
}
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);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if(delc=="true"){
@@ -145,10 +141,8 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
}
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);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "delete") {
if(del>10){
@@ -211,7 +205,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
};
websocketLocal[wslid].onclose = function() {
console.log('WebSocketLocal Closing:' + tlid);
console.warn('WebSocketLocal Closing:' + tlid);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
@@ -224,8 +218,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
};
websocketHome[wshid].onerror = function(error) {
console.error('WebSocketHome Error')
console.error(error);
console.error(['WebSocketHome Error',error])
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Error ' + error);
@@ -238,7 +231,7 @@ function mixre(acct_id, tlid, TLtype, mute,delc,voice,mode) {
}
};
websocketHome[wshid].onclose = function() {
console.log('WebSocketHome Closing:' + tlid);
console.warn('WebSocketHome Closing:' + tlid);
if(mode=="error"){
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');

View File

@@ -147,7 +147,7 @@ function notfCommon(acct_id, tlid, sys) {
}
}
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();
}).catch(function(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=" +
at;
console.log(start);
var wsid = websocketNotf.length;
websocketNotf[acct_id] = new WebSocket(start);
console.log(websocketNotf);
websocketNotf[acct_id].onopen = function(mess) {
console.log("Connect Streaming API(Notf):");
console.log(mess);
console.table({"acct_id":acct_id,"type":"Connect Streaming API(Notf)","domain":domain,"message":[mess]})
$("i[data-notf=" + acct_id +"]").removeClass("red-text");
}
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");
if (!popup) {
popup = 0;
}
console.log(domain)
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
var type = JSON.parse(mess.data).event;
if (type == "notification") {
var templete="";
@@ -264,8 +259,7 @@ function notfWS(misskey,acct_id,tlid,domain,at){
}
//一定のスクロールで発火
function notfmore(tlid) {
console.log(moreloading);
console.log("kicked");
console.log({"status":"kicked","status":moreloading});
var multi = localStorage.getItem("column");
var obj = JSON.parse(multi);
var acct_id = obj[tlid].domain;
@@ -308,7 +302,7 @@ function notfmore(tlid) {
httpreq.onreadystatechange = function() {
if (httpreq.readyState === 4) {
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];
if(json[0]){
var templete="";
@@ -392,12 +386,10 @@ function notfCanceler(acct){
$(".notf-icon_" + acct).removeClass("red-text");
}
function allNotfRead(){
console.log(localStorage.getItem("notf-fav_2"));
var multi = localStorage.getItem("multi");
if (multi) {
var obj = JSON.parse(multi);
Object.keys(obj).forEach(function(key) {
console.log(key);
notfCanceler(key)
});
}

View File

@@ -3,7 +3,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var templete = '';
if(obj[0]){
if(tlid===1){
console.log("testalive:"+"lastunix_"+ tlid+":"+date(obj[0].created_at, 'unix'))
}
localStorage.setItem("lastunix_"+ tlid,date(obj[0].created_at, 'unix'));
}
@@ -886,7 +886,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var datetype = localStorage.getItem("datetype");
Object.keys(obj).forEach(function(key) {
var toot = obj[key];
console.log(toot)
console.log(["Parsing",toot])
if(!toot.username){
var raw=toot;
toot=toot.account;

View File

@@ -25,13 +25,12 @@ function pollCalc(){
var days=$("#days_poll").val();
var hrs=$("#hours_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;
}
//Vote
function voteSelMastodon(acct_id,id,to,mul){
console.log('.vote_'+acct_id+'_'+id+'_'+to);
if($('.vote_'+acct_id+'_'+id+'_'+to).hasClass("sel")){
$('.vote_'+acct_id+'_'+id+'_'+to).css("background-color","transparent")
$('.vote_'+acct_id+'_'+id+'_'+to).removeClass("sel");
@@ -95,7 +94,7 @@ function voteMastodonrefresh(acct_id,id){
httpreqd.onreadystatechange = function() {
if (httpreqd.readyState == 4) {
var json = httpreqd.response;
console.log(json);
console.log(["Refresh vote",json]);
if(!json){
return false;
}

View File

@@ -33,7 +33,6 @@ $repeat = setInterval(function() {
var obj = JSON.parse(voice);
if(obj[0]){
$synthes.text = obj[0];
console.log($synthes);
speechSynthesis.speak($synthes);
obj.splice(0, 1);
var json = JSON.stringify(obj);

View File

@@ -31,7 +31,7 @@ function src(mode) {
}else{
var start = "https://" + domain + "/api/v1/search?q=" + q
}
console.log(start)
console.log("Try to search at "+start)
fetch(start, {
method: 'GET',
headers: {
@@ -44,7 +44,7 @@ function src(mode) {
src("v1")
return false;
}).then(function(json) {
console.log(json);
console.log(["Search",json]);
//ハッシュタグ
if (json.hashtags[0]) {
var tags = "";
@@ -83,14 +83,13 @@ function tsAdd(q){
var obj = JSON.parse(multi);
localStorage.setItem("card_" + obj.length,"true");
obj.push(add);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("column", json);
parseColumn();
}
function tootsearch(tlid,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_icon_" + tlid).text("search");
fetch(start, {
@@ -106,13 +105,10 @@ function tootsearch(tlid,q){
}).then(function(raw) {
var templete="";
var json=raw.hits.hits;
console.log(json);
var max_id = raw["hits"].length;
for(var i=0;i<json.length;i++){
var toot = json[i]["_source"];
console.log(lastid)
if(lastid!=toot.uri){
console.log(toot);
if(toot && toot.account){
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");
moreloading=true;
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_icon_" + tlid).text("search");
fetch(start, {
@@ -149,13 +144,10 @@ function moreTs(tlid,q){
}).then(function(raw) {
var templete="";
var json=raw.hits.hits;
console.log(json);
var max_id = raw["hits"].length;
for(var i=0;i<json.length;i++){
var toot = json[i]["_source"];
console.log(lastid)
if(lastid!=toot.uri){
console.log(toot);
if(toot && toot.account){
templete = templete+parse([toot], "noauth", null, tlid, 0, [], "tootsearch")
}
@@ -175,7 +167,6 @@ function moreTs(tlid,q){
function graphDraw(tag){
var tags="";
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 six=50-(his[6].uses/max*50);
var five=50-(his[5].uses/max*50);

View File

@@ -58,7 +58,7 @@ function favTag(){
Object.keys(obj).forEach(function(key) {
var tag = obj[key];
if(nowPT!=tag){
console.log(nowPT+"/"+tag);
console.log("stable tags:"+nowPT+"/"+tag);
var ptt=lang.lang_tags_realtime;
var nowon="";
}else{
@@ -80,7 +80,6 @@ function trendTag(){
var domain="imastodon.net"
var at = localStorage.getItem("acct_"+ acct_id + "_at");
var start = "https://" + domain + "/api/v1/trend_tags"
console.log(start)
fetch(start, {
method: 'GET',
headers: {

View File

@@ -7,7 +7,7 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var domain = localStorage.getItem("domain_" + acct_id);
//タグとかの場合はカラム追加して描画
if (tlid == "add") {
console.log("add");
console.log("add new column");
var newtab = $(".box").length;
var add = {
domain: acct_id,
@@ -18,7 +18,6 @@ function tl(type, data, acct_id, tlid, delc, voice, mode) {
var obj = JSON.parse(multi);
localStorage.setItem("card_" + obj.length, "true");
obj.push(add);
console.log(obj);
var json = JSON.stringify(obj);
localStorage.setItem("column", json);
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) {
return response.json();
}).catch(function (error) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json)
console.log(["Result of getting timeline of "+tlid,json])
$("#landing_" + tlid).hide();
if (localStorage.getItem("filter_" + acct_id) != "undefined") {
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 +
"/api/v1/streaming/?stream=direct&access_token=" + at;
}
console.log(start);
var wsid = websocket.length;
localStorage.setItem("wss_" + tlid, wsid);
websocket[wsid] = new WebSocket(start);
websocket[wsid].onopen = function (mess) {
console.log(tlid + ":Connect Streaming API:" + type);
console.log(mess);
console.table({"tlid":tlid,"type":"Connect Streaming API"+type,"domain":domain,"message":[mess]})
$("#notice_icon_" + tlid).removeClass("red-text");
}
websocket[wsid].onmessage = function (mess) {
console.log(tlid + ":Receive Streaming API:");
console.log(JSON.parse(mess.data));
console.log([tlid + ":Receive Streaming API:",JSON.parse(mess.data)]);
if (misskey) {
if (JSON.parse(mess.data).type == "note") {
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") {
localStorage.removeItem("delete");
var obj = JSON.parse(JSON.parse(mess.data).payload);
console.log(obj);
if ($("#timeline_" + tlid + " [toot-id=" + obj.id + "]").length < 1) {
if (voice) {
say(obj.content)
@@ -315,8 +310,7 @@ function reload(type, cc, acct_id, tlid, data, mute, delc, voice, mode) {
return false;
};
websocket[wsid].onclose = function () {
console.log("Closing");
console.log(tlid);
console.warn("Closing "+tlid);
if (mode == "error") {
$("#notice_icon_" + tlid).addClass("red-text");
todo('WebSocket Closed');
@@ -431,7 +425,6 @@ function moreload(type, tlid) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
} else {
@@ -447,7 +440,7 @@ function moreload(type, tlid) {
}
//TL差分取得
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 obj = JSON.parse(multi);
var acct_id = obj[tlid].domain;
@@ -540,7 +533,7 @@ function tlDiff(type, data, acct_id, tlid, delc, voice, mode) {
todo(error);
console.error(error);
}).then(function (json) {
console.log(json);
console.log(["Result diff of TL"+tlid,json]);
if (misskey) {
var templete = misskeyParse(json, '', acct_id, tlid, "", mute);
} else {
@@ -564,12 +557,12 @@ function tlCloser() {
Object.keys(websocket).forEach(function (tlid) {
if (websocketOld[tlid]) {
websocketOld[tlid].close();
console.log("Close Streaming API: Old" + tlid);
console.log("%c Close Streaming API: Old" + tlid,"color:blue");
}
if (websocket[0]) {
console.log(websocket[0]);
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) {
if (websocketHome[tlid]) {
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) {
if (websocketLocal[tlid]) {
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) {
if (websocketNotf[tlid]) {
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) {
if (misskeyws[tlid]) {
misskeyws[tlid].close();
console.log("Close Streaming API:Misskey" + tlid);
console.log("%c Close Streaming API:Misskey" + tlid,"color:blue");
}
});
misskeyws={}
@@ -789,7 +782,7 @@ function strAliveInt() {
setTimeout(strAlive, 10000);
}
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 (localStorage.getItem("voice_" + tlid)) {
var voice = true;