Skip to content

Commit cbef321

Browse files
Run mobile scoreboard logic only after the page has loaded.
1 parent 0a82007 commit cbef321

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
@@ -989,7 +989,9 @@ function resizeMobileTeamNamesAndProblemBadges() {
989989
});
990990
}
991991

992-
if (document.querySelector('.mobile-scoreboard')) {
993-
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
994-
resizeMobileTeamNamesAndProblemBadges();
995-
}
992+
$(function() {
993+
if (document.querySelector('.mobile-scoreboard')) {
994+
window.addEventListener('resize', resizeMobileTeamNamesAndProblemBadges);
995+
resizeMobileTeamNamesAndProblemBadges();
996+
}
997+
});

0 commit comments

Comments
 (0)