Skip to content

Commit 9f6a187

Browse files
Run mobile scoreboard logic only after the page has loaded.
1 parent 82405b1 commit 9f6a187

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

webapp/public/js/domjudge.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,9 @@ function resizeMobileTeamNamesAndProblemBadges() {
869869
});
870870
}
871871

872-
if (document.querySelector('.mobile-scoreboard')) {
873-
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
874-
resizeMobileTeamNamesAndProblemBadges();
875-
}
872+
$(function() {
873+
if (document.querySelector('.mobile-scoreboard')) {
874+
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
875+
resizeMobileTeamNamesAndProblemBadges();
876+
}
877+
});

0 commit comments

Comments
 (0)