annotate www/m.a/js/countin.js @ 101:52e44ee1c791 tip master

enabled all scores in autostart script
author Rob Canning <rc@kiben.net>
date Tue, 21 Apr 2015 16:20:57 +0100
parents 49c94f63b8b0
children
rev   line source
rc-web@42 1 /////////////////////////////////////////////////
rc-web@42 2 // countdown to change
rc-web@42 3 var socket = io.connect();
rc-web@42 4
rc-web@42 5 socket.on("countinFromServer", countinClient);
rc-web@42 6 function countinClient(groupID, currentseconds,mm,text,colour,background){
rc-web@42 7 var groupPage=document.getElementById('group').value
rc-web@42 8 if (groupID == groupPage) {
rc-web@42 9 console.log(currentseconds);
rc-web@42 10 document.getElementById("countinnumber").style.visibility="visible";
rc-web@42 11 document.getElementById("countinnumber").style.visibility="visible";
rc-web@42 12 //$("#countin").text(text);
rc-web@42 13 $("#countinnumber").text(currentseconds);
rc-web@42 14 $("#countinnumber").css('background-color', background);
rc-web@42 15
rc-web@42 16 document.getElementById("countinnumber").style.color=colour;
rc-web@42 17
rc-web@42 18 if ( currentseconds == 0) {
rc-web@42 19 document.getElementById("countinnumber").style.visibility='hidden';
rc-web@42 20 // document.getElementById("countin").style.visibility='hidden';
rc-web@42 21 }
rc-web@42 22 }}
rc-web@42 23
rc-web@42 24 /////////////////////////////////////////////////