From d18d5f869d57d31c987b4b7fe0c7feae9aba8b2e Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 14 Sep 2026 17:33:18 +0200 Subject: fetchStudents: do not consider innerHTML for role selection The HTML for the role assignments contains all options and thus makes the separation not possible. --- src/student-prod.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/student-prod.ts') diff --git a/src/student-prod.ts b/src/student-prod.ts index 0dcbc71..5a1673e 100644 --- a/src/student-prod.ts +++ b/src/student-prod.ts @@ -26,12 +26,13 @@ async function _fetchStudents() { const doc = new DOMParser().parseFromString(await res.text(), "text/html"); const table = doc.querySelector("tbody")!; const fetchedStudents: Array = []; - table.querySelectorAll("tr").forEach((row) => { + const rows = table.querySelectorAll("tr"); + rows.forEach((row) => { if (row.classList.contains("emptyrow")) return; const roleCell = row.querySelector(".c4")!; // TODO(muhq): Is this locale dependent? - if (roleCell.innerHTML.includes("Lehrer")) { + if (roleCell.textContent.includes("Lehrer")) { return; } -- cgit v1.2.3