WIP
This commit is contained in:
		@@ -34,8 +34,15 @@
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    $.bind('twitchFollow', function(event) {
 | 
				
			||||||
 | 
					        sendData('follow', event.getFollower());
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					    $.bind('twitchSubscriber', function(event) {
 | 
				
			||||||
 | 
					        sendData('subscribe', event.getSubscriber());
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    $.bind('initReady', function() {
 | 
					    $.bind('initReady', function() {
 | 
				
			||||||
        $.registerChatCommand('./custom/custom/customOverlay.js', 'overlay');
 | 
					        $.registerChatCommand('./custom/custom/customOverlay.js', 'overlay', 2);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        $.registerChatSubcommand('overlay', 'follow', 2);
 | 
					        $.registerChatSubcommand('overlay', 'follow', 2);
 | 
				
			||||||
        $.registerChatSubcommand('overlay', 'subscribe', 2);
 | 
					        $.registerChatSubcommand('overlay', 'subscribe', 2);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,8 +39,8 @@ $(function () {
 | 
				
			|||||||
        $('#follow').text(lastFollow);
 | 
					        $('#follow').text(lastFollow);
 | 
				
			||||||
        $('#subscribe').text(lastSub);
 | 
					        $('#subscribe').text(lastSub);
 | 
				
			||||||
        $('#donate').text(lastDonator);
 | 
					        $('#donate').text(lastDonator);
 | 
				
			||||||
        $('#cfollow').parent().closest('div').progressbar({ value : 5.0/parseInt(queryMap.getOrElse('follow',9999))*100 });
 | 
					        $('#cfollow').parent().closest('div').progressbar({ value : countFollow/parseInt(queryMap.getOrElse('follow',9999))*100 });
 | 
				
			||||||
        $('#csubscribe').parent().closest('div').progressbar({ value : 5.0/parseInt(queryMap.getOrElse('subscribe',9999))*100});
 | 
					        $('#csubscribe').parent().closest('div').progressbar({ value : countSub/parseInt(queryMap.getOrElse('subscribe',9999))*100});
 | 
				
			||||||
        $('#cfollow').text(`${countFollow} / ${queryMap.getOrElse('follow',9999)}`);
 | 
					        $('#cfollow').text(`${countFollow} / ${queryMap.getOrElse('follow',9999)}`);
 | 
				
			||||||
        $('#csubscribe').text(`${countSub} / ${queryMap.getOrElse('subscribe',9999)}`);
 | 
					        $('#csubscribe').text(`${countSub} / ${queryMap.getOrElse('subscribe',9999)}`);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -94,8 +94,9 @@ $(function () {
 | 
				
			|||||||
                    refreshUI();
 | 
					                    refreshUI();
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
                socket.getDBValue('get_current_stream_info_counts', 'panelData', 'stream', (e)=>{
 | 
					                socket.getDBValue('get_current_stream_info_counts', 'panelData', 'stream', (e)=>{
 | 
				
			||||||
                    console.log(e)
 | 
					                    let data = JSON.parse(e.panelData);
 | 
				
			||||||
                    console.log(JSON.parse(e.panelData))
 | 
					                    countFollow = data.followers;
 | 
				
			||||||
 | 
					                    countSub = 0;
 | 
				
			||||||
                })
 | 
					                })
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
        }catch(e) {console.log(e)}
 | 
					        }catch(e) {console.log(e)}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user