15 lines
547 B
JavaScript
15 lines
547 B
JavaScript
jQuery(document).ready(function ($) {
|
|
fetch(scoreboardData.templatesUrl + 'scoreboard.html')
|
|
.then(r => r.text())
|
|
.then(html => {
|
|
const container = $(html).appendTo('.entry-content');
|
|
const data = JSON.parse(scoreboardData.timeline);
|
|
const list = container.find('#scoreboard-list');
|
|
|
|
data.forEach(ev => {
|
|
const item = $(`<li>${ev.minute}' - ${ev.team || 'N/A'} - ${ev.type}</li>`);
|
|
list.append(item);
|
|
});
|
|
});
|
|
});
|