Fix Xonotic score updates for JavaScript blocking visitors

This commit is contained in:
DeathByDenim 2023-05-06 07:25:49 -04:00
parent d04cb5103c
commit 36699e81f5
Signed by: DeathByDenim
GPG Key ID: 89185F675E0AB7D5
1 changed files with 2 additions and 2 deletions

View File

@ -27,14 +27,14 @@ nav_pill: tournament
<div id="xonotic-results"></div> <div id="xonotic-results"></div>
<script> <script>
if(typeof d3 === 'undefined') { if(typeof d3 === 'undefined') {
document.write('<p><a href="xonscore.csv">Results</a> (allow access to d3js.org for dynamic updates)</p>'); document.write('<p><a href="xonscore.txt">Results</a> (allow access to d3js.org for dynamic updates)</p>');
} }
else { else {
xonoticScoreUpdate(); xonoticScoreUpdate();
setInterval(xonoticScoreUpdate, 10000); setInterval(xonoticScoreUpdate, 10000);
} }
</script> </script>
<noscript><p><a href="xonscore.csv">Results</a> (Enable JavaScript for dynamic updates)</p></noscript> <noscript><p><a href="xonscore.txt">Results</a> (Enable JavaScript for dynamic updates)</p></noscript>
{% else %} {% else %}
<p>No tournaments have been planned for the next event.</p> <p>No tournaments have been planned for the next event.</p>
{% endif %} {% endif %}