When IntegTL str closed, icons become red

This commit is contained in:
cutls 2019-11-16 23:04:31 +09:00
parent 022565e176
commit af38681293

View File

@ -87,8 +87,8 @@ function mixre(acct_id, tlid, TLtype, mute, voice, mode) {
wsLocal[wslid].onerror = function(error) {
console.error('WebSocketLocal Error')
console.error(error)
$('#notice_icon_' + tlid).addClass('red-text')
if (mode == 'error') {
$('#notice_icon_' + tlid).addClass('red-text')
todo('WebSocket Error ' + error)
} else {
var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
@ -100,8 +100,8 @@ function mixre(acct_id, tlid, TLtype, mute, voice, mode) {
}
wsLocal[wslid].onclose = function() {
console.warn('WebSocketLocal Closing:' + tlid)
$('#notice_icon_' + tlid).addClass('red-text')
if (mode == 'error') {
$('#notice_icon_' + tlid).addClass('red-text')
todo('WebSocket Closed')
} else {
var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
@ -113,8 +113,8 @@ function mixre(acct_id, tlid, TLtype, mute, voice, mode) {
}
wsHome[wshid].onerror = function(error) {
console.error(['WebSocketHome Error', error])
$('#notice_icon_' + tlid).addClass('red-text')
if (mode == 'error') {
$('#notice_icon_' + tlid).addClass('red-text')
todo('WebSocket Error ' + error)
} else {
var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1
@ -126,8 +126,8 @@ function mixre(acct_id, tlid, TLtype, mute, voice, mode) {
}
wsHome[wshid].onclose = function() {
console.warn('WebSocketHome Closing:' + tlid)
$('#notice_icon_' + tlid).addClass('red-text')
if (mode == 'error') {
$('#notice_icon_' + tlid).addClass('red-text')
todo('WebSocket Closed')
} else {
var errorct = localStorage.getItem('wserror_' + tlid) * 1 + 1