Skip to content

Commit cb551c1

Browse files
Run mobile scoreboard logic only after the page has loaded.
1 parent e164fbb commit cb551c1

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
@@ -983,7 +983,9 @@ function resizeMobileTeamNamesAndProblemBadges() {
983983
});
984984
}
985985

986-
if (document.querySelector('.mobile-scoreboard')) {
987-
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
988-
resizeMobileTeamNamesAndProblemBadges();
989-
}
986+
$(function() {
987+
if (document.querySelector('.mobile-scoreboard')) {
988+
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
989+
resizeMobileTeamNamesAndProblemBadges();
990+
}
991+
});

0 commit comments

Comments
 (0)