X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=carousel.js;h=bbab9aafe300ea0787f291a32a75fd33efbaebf5;hb=a1e792a7a3221797adeb013e92882ff25bd9a48e;hp=b62fc270fb8ffdbbaa8b5bc402cd543b6ac9d8b3;hpb=44bf264bc9045503216832dcc7261f885983df4c;p=ultimatescore diff --git a/carousel.js b/carousel.js index b62fc27..bbab9aa 100644 --- a/carousel.js +++ b/carousel.js @@ -391,7 +391,7 @@ function display_group_parsed(teams, games, group_name) let carousel = document.getElementById('carousel'); clear_carousel(carousel); - addheading(carousel, 5, "Current standings, Trøndisk 2018
" + group_name); + addheading(carousel, 5, "Current standings, " + ultimateconfig['tournament_title'] + "
" + group_name); let tr = document.createElement("tr"); tr.className = "subfooter"; addth(tr, "rank", ""); @@ -427,7 +427,7 @@ function display_group_parsed(teams, games, group_name) let footer_tr = document.createElement("tr"); footer_tr.className = "footer"; let td = document.createElement("td"); - td.appendChild(document.createTextNode("www.trondheimfrisbeeklubb.no | #trøndisk")); + td.appendChild(document.createTextNode(ultimateconfig['tournament_footer'])); td.setAttribute("colspan", "5"); footer_tr.appendChild(td); carousel.appendChild(footer_tr); @@ -541,7 +541,7 @@ function display_stream_schedule_parsed(teams, games, page) { let carousel = document.getElementById('carousel'); clear_carousel(carousel); - addheading(carousel, 3, "Stream schedule, Trøndisk 2018
" + covered_days.join('/') + " (all times CET)"); + addheading(carousel, 3, "Stream schedule, " + ultimateconfig['tournament_title'] + "
" + covered_days.join('/') + " (all times CET)"); let teams_to_idx = make_teams_to_idx(teams); row_num = 0; @@ -581,7 +581,7 @@ function get_group(group_name, cb) req.onload = function(e) { cb(JSON.parse(req.responseText), group_name); }; - req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/1ygfeR6njBUmLyuLRq7zfYW5slMWBGnj4XxzQQ4WJklU/values/\'' + group_name + '\'!A1:J50?key=AIzaSyAuP9yQn8g0bSay6r_RpGtpFeIbwprH1TU'); + req.open('GET', 'https://sheets.googleapis.com/v4/spreadsheets/' + ultimateconfig['score_sheet_id'] + '/values/\'' + group_name + '\'!A1:J50?key=' + ultimateconfig['api_key']); req.send(); } @@ -624,6 +624,7 @@ function showschedule(page) get_group('Group A', cb); get_group('Group B', cb); + get_group('Group C', cb); get_group('Playoffs', cb); }; @@ -661,6 +662,8 @@ function showcarousel() [ 13000, function() { display_group_parsed(teams_per_group['Group A'], games_per_group['Group A'], 'Group A'); } ], [ 2000, function() { hidetable(); } ], [ 13000, function() { display_group_parsed(teams_per_group['Group B'], games_per_group['Group B'], 'Group B'); } ], + [ 2000, function() { hidetable(); } ], + [ 13000, function() { display_group_parsed(teams_per_group['Group C'], games_per_group['Group C'], 'Group C'); } ], [ 2000, function() { hidetable(); } ] ]; let num_pages = find_num_pages(combined_games); @@ -675,6 +678,7 @@ function showcarousel() get_group('Group A', cb); get_group('Group B', cb); + get_group('Group C', cb); get_group('Playoffs', cb); }; @@ -695,5 +699,18 @@ function hidescorebug() function showscorebug() { document.getElementById('entire-bug').style.display = null; -}; +} + +function showmatch2() +{ + let css = "-webkit-animation: fade-in 1.0s ease; -webkit-animation-fill-mode: both;"; + document.getElementById('scorebug2').style = css; + document.getElementById('clockbug2').style = css; +} +function hidematch2() +{ + let css = "-webkit-animation: fade-out 1.0s ease; -webkit-animation-fill-mode: both;"; + document.getElementById('scorebug2').style = css; + document.getElementById('clockbug2').style = css; +}