class HighScoreLoader{ constructor(){ this.table = document.getElementById("highscoreTable"); this.data = undefined; // Jetzigen Count finden const urlParams = new URLSearchParams(window.location.search); this.count = parseInt(urlParams.get("count")) || 1; this.countSelector = document.getElementById("count"); this.setup(); } async setup(){ // Load all Data const response = await fetch(`/api/highscore/split/${this.count}`); this.data = await response.json(); for(const score of this.data.scores){ this.table.innerHTML += `