]> git.sesse.net Git - ultimatescore/blobdiff - score.js
Unbreak non-carousel schedule display.
[ultimatescore] / score.js
index a479778d29df616f3304b927af6a653ccc8d8cf1..60f420e670fc73a0359b315b8c88a9c35b771d39 100644 (file)
--- a/score.js
+++ b/score.js
@@ -2,7 +2,7 @@ var clock_running = false;
 var clock_visible = false;
 var comment_visible = false;
 var lowerthird_visible = false;
-var clock_left = 25 * 60;
+var clock_left = 30 * 60;
 var scoreA = 0;
 var scoreB = 0;
 var clock_origin;
@@ -12,6 +12,9 @@ function setteams()
 {
        document.getElementById('team1').innerHTML = state['team1'];
        document.getElementById('team2').innerHTML = state['team2'];
+
+       var sheets = { 'A': state['team1'], 'B': state['team2'] };
+       loadquickl3s(sheets);
 }
 
 function setcolors()
@@ -107,10 +110,16 @@ function showlowerthird()
        g = document.getElementById('lowerthird-subheading-content');
        f.style.paddingTop = Math.round((f.clientHeight - g.clientHeight) / 2) + 'px';
 
+       f = document.getElementById('lowerthird-picture');
+       g = document.getElementById('lowerthird-picture-content');
+       f.style.paddingTop = Math.round((f.clientHeight - g.clientHeight) / 2) + 'px';
+
        document.getElementById('lowerthird-headline').className = 'lowerthird-headline lowerthird-headline-animate-in';
        document.getElementById('lowerthird-headline-content').className = 'lowerthird-headline-content lowerthird-headline-content-animate-in';
        document.getElementById('lowerthird-subheading').className = 'lowerthird-subheading lowerthird-subheading-animate-in';
        document.getElementById('lowerthird-subheading-content').className = 'lowerthird-subheading-content lowerthird-subheading-content-animate-in';
+       document.getElementById('lowerthird-picture').className = 'lowerthird-picture lowerthird-picture-animate-in';
+       document.getElementById('lowerthird-picture-content').className = 'lowerthird-picture-content lowerthird-picture-content-animate-in';
        lowerthird_visible = true;
 }
 
@@ -118,6 +127,13 @@ function setandshowlowerthird()
 {
        document.getElementById('lowerthird-headline-content').innerHTML = state['text1'];
        document.getElementById('lowerthird-subheading-content').innerHTML = state['text2'];
+       var img = document.getElementById('lowerthird-img');
+       if (state['image'] === undefined) {
+               img.style.display = 'none';
+       } else {
+               img.src = state['image'];       
+               img.style.display = 'inline';
+       }
        showlowerthird();
 }
 
@@ -128,6 +144,8 @@ function hidelowerthird()
        document.getElementById('lowerthird-headline-content').className = 'lowerthird-headline-content lowerthird-headline-content-animate-out';
        document.getElementById('lowerthird-subheading').className = 'lowerthird-subheading lowerthird-subheading-animate-out';
        document.getElementById('lowerthird-subheading-content').className = 'lowerthird-subheading-content lowerthird-subheading-content-animate-out';
+       document.getElementById('lowerthird-picture').className = 'lowerthird-picture lowerthird-picture-hidden lowerthird-picture-animate-out';
+       document.getElementById('lowerthird-picture-content').className = 'lowerthird-picture-content lowerthird-picture-content-animate-out';
        lowerthird_visible = false;
 }