File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ function getCookie(name)
200200
201201function getSelectedTeams ( )
202202{
203- var cookieVal = getCookie ( "domjudge_teamselection" ) ;
203+ var cookieVal = localStorage . getItem ( "domjudge_teamselection" ) ;
204204 if ( cookieVal === null || cookieVal === "" ) {
205205 return new Array ( ) ;
206206 }
@@ -284,10 +284,15 @@ function toggle(id, show)
284284 }
285285
286286 var cookieVal = JSON . stringify ( favTeams ) ;
287- setCookie ( "domjudge_teamselection" , cookieVal ) ;
287+ localStorage . setItem ( "domjudge_teamselection" , cookieVal ) ;
288288
289289
290290 $ ( '.loading-indicator' ) . addClass ( 'ajax-loader' ) ;
291+ // If we are on a local file system, reload the window
292+ if ( window . location . protocol === 'file:' ) {
293+ window . location . reload ( ) ;
294+ return ;
295+ }
291296 $ . ajax ( {
292297 url : scoreboardUrl ,
293298 cache : false
You can’t perform that action at this time.
0 commit comments