Last active
February 23, 2026 13:48
-
-
Save Greenscreener/9713d12905d6993c75cba213a222e292 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function avgvar(str) { | |
| return str.replaceAll(",",".").split(":").map(e => parseFloat(e)) | |
| } | |
| function anketatoarray() { | |
| let ucitel = ""; | |
| const list = []; | |
| for (let tr of document.querySelectorAll("#content > .tab1 tr")) { | |
| if (tr.children[0].innerText.trim() === "") continue; | |
| else if (tr.children.length === 1) { | |
| ucitel = tr.children[0].innerText.trim(); | |
| } else { | |
| list.push([ | |
| ucitel, | |
| tr.children[0].innerText.trim(), | |
| tr.children[1].innerText.trim(), | |
| ...(tr.children[2].innerText.trim() === "-" ? avgvar(tr.children[3].innerText.trim()) : avgvar(tr.children[2].innerText.trim())), | |
| ]) | |
| } | |
| } | |
| return list; | |
| } | |
| function anketatotsv() { | |
| return `Učitel\tPředmět\tPočet\tPrůměr\tRozptyl?\n` + anketatoarray().map(e => e.join("\t")).join("\n") + "\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment