$('#menu-select').on('change', function() {
location.href = this.value;
});
if (typeof period !== 'undefined') $(`a#${period}`).addClass('selected')
function formatLaptime(time) {
const date = new Date(time * 1000);
const minutes = String(date.getMinutes()).padStart(2, '0')
const seconds = String(date.getSeconds()).padStart(2, '0')
const miliseconds = date.getMilliseconds()
return `${minutes}:${seconds}:${miliseconds}`
}
function weatherTag(weather)
{
switch(weather)
{
case 0:
return '';
case 1:
return '';
case 2:
return '';
case 3:
return '';
default:
return ''
}
}
function linkTag(id, type , content) {
const url = `${base_url}/${type}/${id}`
if (type == 'race') content = `#${content}`
return `${content}`;
}