fix auto scroll

prod
Razmig Sarkissian 2 years ago
parent a8637bb27d
commit a32b34fc1e
  1. 15
      scores/templates/scores/brackets.html
  2. 17
      scores/templates/scores/ranks.html
  3. 17
      scores/templates/scores/teams.html
  4. 15
      scores/templates/scores/tournament.html

@ -32,14 +32,6 @@
} else { } else {
iScrollInterval = iScroll * 10; iScrollInterval = iScroll * 10;
} }
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() { var loop = function() {
var iScroll = $(document).height() - $(window).height(); var iScroll = $(document).height() - $(window).height();
@ -54,12 +46,11 @@
duration : iScrollInterval, duration : iScrollInterval,
easing : "linear", easing : "linear",
complete : function() { complete : function() {
setTimeout(fade, iInterval);
}
});
setTimeout(function(){ setTimeout(function(){
window.location.reload(); window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000)); }, iInterval);
}
});
}; };
setTimeout(loop, iInterval); setTimeout(loop, iInterval);
</script> </script>

@ -15,7 +15,7 @@
<title>Padel</title> <title>Padel</title>
</head> </head>
{% if tv %} {% if tv %}
<div class="wrapper" style="zoom:200%"> <div class="wrapper" style="zoom:125%">
{% else %} {% else %}
<div class="wrapper"> <div class="wrapper">
{% endif %} {% endif %}
@ -33,14 +33,6 @@
} else { } else {
iScrollInterval = iScroll * 10; iScrollInterval = iScroll * 10;
} }
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() { var loop = function() {
var iScroll = $(document).height() - $(window).height(); var iScroll = $(document).height() - $(window).height();
@ -55,12 +47,11 @@
duration : iScrollInterval, duration : iScrollInterval,
easing : "linear", easing : "linear",
complete : function() { complete : function() {
setTimeout(fade, iInterval);
}
});
setTimeout(function(){ setTimeout(function(){
window.location.reload(); window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000)); }, iInterval);
}
});
}; };
setTimeout(loop, iInterval); setTimeout(loop, iInterval);
</script> </script>

@ -15,7 +15,7 @@
<title>Padel</title> <title>Padel</title>
</head> </head>
{% if tv %} {% if tv %}
<div class="wrapper" style="zoom:200%"> <div class="wrapper" style="zoom:125%">
{% else %} {% else %}
<div class="wrapper"> <div class="wrapper">
{% endif %} {% endif %}
@ -33,14 +33,6 @@
} else { } else {
iScrollInterval = iScroll * 10; iScrollInterval = iScroll * 10;
} }
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() { var loop = function() {
var iScroll = $(document).height() - $(window).height(); var iScroll = $(document).height() - $(window).height();
@ -55,12 +47,11 @@
duration : iScrollInterval, duration : iScrollInterval,
easing : "linear", easing : "linear",
complete : function() { complete : function() {
setTimeout(fade, iInterval);
}
});
setTimeout(function(){ setTimeout(function(){
window.location.reload(); window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000)); }, iInterval);
}
});
}; };
setTimeout(loop, iInterval); setTimeout(loop, iInterval);
</script> </script>

@ -32,14 +32,6 @@
} else { } else {
iScrollInterval = iScroll * 10; iScrollInterval = iScroll * 10;
} }
var fade = function() {
$("body").fadeOut(iFadeInterval, function(){
$("html, body").scrollTop(0);
$("body").fadeIn(iFadeInterval,function(){
setTimeout(loop, iInterval);
});
});
}
var loop = function() { var loop = function() {
var iScroll = $(document).height() - $(window).height(); var iScroll = $(document).height() - $(window).height();
@ -54,12 +46,11 @@
duration : iScrollInterval, duration : iScrollInterval,
easing : "linear", easing : "linear",
complete : function() { complete : function() {
setTimeout(fade, iInterval);
}
});
setTimeout(function(){ setTimeout(function(){
window.location.reload(); window.location.reload();
}, Math.max(iScrollInterval * 10 + 2000, 15000)); }, iInterval);
}
});
}; };
setTimeout(loop, iInterval); setTimeout(loop, iInterval);
</script> </script>

Loading…
Cancel
Save