This commit is contained in:
choelzl 2022-02-06 21:02:09 +01:00
parent 99ca610a7e
commit 22af32adc2
Signed by: sora
GPG Key ID: A362EA0491E2EEA0

View File

@ -9,6 +9,10 @@
})); }));
} }
// $.inidb.get('streamInfo', 'lastSub', subscriber);
// $.inidb.get('streamInfo', 'lastFollow', follower);
// $.inidb.get('streamInfo', 'lastDonator', donationUsername);
$.bind('command', function(event) { $.bind('command', function(event) {
const sender = "" + event.getSender().toLowerCase(), const sender = "" + event.getSender().toLowerCase(),
@ -43,5 +47,17 @@
$.registerChatSubcommand('overlay', 'timer', 2); $.registerChatSubcommand('overlay', 'timer', 2);
}); });
$(document).ready(async ()=>{
if(socket){
while(socket.getReadyState() === 0){
await new Promise(r => setTimeout(r, 500));
}
socket.getDBValue("get_current_stream_info", 'streamInfo', 'lastSub', function(response) {
console.log(response);
if(response.request_data) console.log(response.request_data)
})
}
})
})(); })();