TheDesk 21.2.0 (Mayu)

This commit is contained in:
cutls
2020-09-09 17:15:19 +09:00
parent 051dbb3b1b
commit 16b68bb190
5 changed files with 22 additions and 22 deletions

View File

@@ -1554,7 +1554,11 @@ function mastodonBaseStreaming(acct_id) {
if(mastodonBaseWsStatus[domain]) return
mastodonBaseWsStatus[domain] = 'undetected'
const at = localStorage.getItem(`acct_${acct_id}_at`)
const start = `wss://${domain}/api/v1/streaming/?access_token=${at}`
let wss = 'wss://' + domain
if (localStorage.getItem('streaming_' + acct_id)) {
wss = localStorage.getItem('streaming_' + acct_id)
}
const start = `${wss}/api/v1/streaming/?access_token=${at}`
mastodonBaseWs[domain] = new WebSocket(start)
mastodonBaseWs[domain].onopen = function () {
mastodonBaseWsStatus[domain] = 'connecting'

View File

@@ -219,9 +219,9 @@ function moreTs(tlid, q) {
function graphDraw(tag, acct_id) {
var tags = ''
var his = tag.history
return graphDrawCore(his, tag)
return graphDrawCore(his, tag, acct_id)
}
function graphDrawCore(his, tag) {
function graphDrawCore(his, tag, acct_id) {
var max = Math.max.apply(null, [
his[0].uses,
his[1].uses,
@@ -307,7 +307,7 @@ function trend() {
Object.keys(json).forEach(function(keye) {
var tag = json[keye]
var his = tag.history
tags = graphDrawCore(his, tag)
tags = graphDrawCore(his, tag, acct_id)
$('#src-contents').append(tags)
})