]> git.sesse.net Git - ultimatescore/blobdiff - carousel.js
Add some functionality to hide and show the scorebug itself, and also to control...
[ultimatescore] / carousel.js
index 3d8d20f03220005760af088b40819a138df13981..10c9e3f70587b8273c311c1c5a37f9dfc1c64fbc 100644 (file)
@@ -288,6 +288,8 @@ var display_group = function(response, group_name)
 
 var display_group_parsed = function(teams, games, group_name)
 {
+       document.getElementById('entire-bug').style.display = 'none';
+
        var teams_to_idx = make_teams_to_idx(teams);
        for (i = 0; i < games.length; ++i) {
                var idx1 = teams_to_idx[games[i].name1];
@@ -404,6 +406,8 @@ var display_stream_schedule = function(response, group_name) {
 };
 
 var display_stream_schedule_parsed = function(teams, games) {
+       document.getElementById('entire-bug').style.display = 'none';
+
        var teams_to_idx = make_teams_to_idx(teams);
        games = games.filter(function(game) { return game.streamtime !== undefined && game.streamtime.match(/[0-9]+:[0-9]+/) != null; });
        games.sort(function(a, b) {
@@ -473,6 +477,11 @@ var showgroup = function(group_name)
        get_group(group_name, display_group);
 };
 
+var showgroup_from_state = function()
+{
+       showgroup(state['group_name']);
+};
+
 var carousel_timeout = null;
 
 var hidetable = function()
@@ -554,3 +563,13 @@ var stopcarousel = function()
        }
 };
 
+var hidescorebug = function()
+{
+       document.getElementById('entire-bug').style.display = 'none';
+}
+
+var showscorebug = function()
+{
+       document.getElementById('entire-bug').style.display = null;
+};
+