Try schedule nav

This commit is contained in:
Tobias 2019-01-21 21:57:13 +13:00
parent d61f4ffd88
commit b89b5b5aa2

View file

@ -98,5 +98,16 @@
$('#schedule-date').text(day + ' ' + dates[day] + trailing); $('#schedule-date').text(day + ' ' + dates[day] + trailing);
}) })
</script> </script>
<script>
const urlParams = new URLSearchParams(window.location.search);
const scheduleName = urlParams.get('schedule');
if (schedule == null) {
var currentName = $('div#schedule-nav').children('a.active').first().attr('aria-controls');
window.location += '?schedule=' + currentName;
} else {
$('a[href="#' + scheduleName + '"]').tab('show');
}
</script>
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock %}