From 1c6d430be83bb3292ae65ce7955936163a10b854 Mon Sep 17 00:00:00 2001 From: choelzl Date: Sun, 6 Feb 2022 22:02:11 +0100 Subject: [PATCH] WIP --- web/overlay/index.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/web/overlay/index.js b/web/overlay/index.js index 786b68d..8251bf7 100644 --- a/web/overlay/index.js +++ b/web/overlay/index.js @@ -21,12 +21,12 @@ $(function () { const getOrElse = (option, def) => queryMap.has(option) ? queryMap.get(option): def; const refreshUI = () => { - if(queryMap.single){ $("all").hide(); $("single").show(); } - else{ $("all").show(); $("single").hide(); } + if(queryMap.single){ $("#all").hide(); $("#single").show(); } + else{ $("#all").show(); $("#single").hide(); } - $('follow').text(lastFollow); - $('subscribe').text(lastSub); - $('donate').text(lastDonator); + $('#follow').text(lastFollow); + $('#subscribe').text(lastSub); + $('#donate').text(lastDonator); } const handleSocketMessage = (e)=>{ @@ -62,17 +62,14 @@ $(function () { await new Promise(r => setTimeout(r, 500)); } socket.getDBValue("get_current_stream_info_lastFollow", 'streamInfo', 'lastFollow', (response)=>{ - console.log(response, response[0], response.streamInfo) if(response.streamInfo) lastFollow = response.streamInfo || lastFollow; refreshUI(); }) socket.getDBValue("get_current_stream_info_lastSub", 'streamInfo', 'lastSub', (response)=>{ - console.log(response) if(response.streamInfo) lastSub = response.streamInfo || lastSub; refreshUI(); }) socket.getDBValue("get_current_stream_info_lastDonator", 'streamInfo', 'lastDonator', (response)=>{ - console.log(response) if(response.streamInfo) lastDonator = response.streamInfo || lastDonator; refreshUI(); })