Skip to content

Commit

Permalink
Fix hearts for scoreboard on local filesystem
Browse files Browse the repository at this point in the history
Fixes #2724
  • Loading branch information
nickygerritsen committed Nov 22, 2024
1 parent ef55f05 commit 42bb954
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions webapp/public/js/domjudge.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ function getCookie(name)

function getSelectedTeams()
{
var cookieVal = getCookie("domjudge_teamselection");
var cookieVal = localStorage.getItem("domjudge_teamselection");
if (cookieVal === null || cookieVal === "") {
return new Array();
}
Expand Down Expand Up @@ -284,10 +284,15 @@ function toggle(id, show)
}

var cookieVal = JSON.stringify(favTeams);
setCookie("domjudge_teamselection", cookieVal);
localStorage.setItem("domjudge_teamselection", cookieVal);


$('.loading-indicator').addClass('ajax-loader');
// If we are on a local file system, reload the window
if (window.location.protocol === 'file:') {
window.location.reload();
return;
}
$.ajax({
url: scoreboardUrl,
cache: false
Expand Down

0 comments on commit 42bb954

Please sign in to comment.