diff options
author | Anton Luka Šijanec <sijanecantonluka@gmail.com> | 2020-06-08 16:03:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-08 16:03:42 +0200 |
commit | 6d5e61259b562c058db335e24c72fe6db937c659 (patch) | |
tree | 386288c539024d6692c8244e491e1828090dfc91 /assets/js | |
parent | Merge pull request #22 from beziapp/dev (diff) | |
parent | fixed grades for edge-case and removed performance optimizations (diff) | |
download | beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar.gz beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar.bz2 beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar.lz beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar.xz beziapp-6d5e61259b562c058db335e24c72fe6db937c659.tar.zst beziapp-6d5e61259b562c058db335e24c72fe6db937c659.zip |
Diffstat (limited to '')
-rw-r--r-- | assets/js/gsec.js | 14 | ||||
-rw-r--r-- | assets/js/login.js | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/assets/js/gsec.js b/assets/js/gsec.js index 6cef90e..73e8fd2 100644 --- a/assets/js/gsec.js +++ b/assets/js/gsec.js @@ -481,7 +481,8 @@ class gsec { let gradeSpans = parsed.getElementsByClassName("txtVOcObd"); for (const grade of gradeSpans) { - var ist = grade.getElementsByTagName("span")[0].getAttribute("title").split("\n"); + var whatever_ist_meant_in_my_head_back_then_but_as_a_string = grade.getElementsByTagName("span")[0].getAttribute("title"); + var ist = whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("\n"); if (ist.length == 1) { // that means the txtVOcObd defines a zaključno oceno // gimsis is just utter crap var gradeToAdd = { "gradeType": GSEC_ZAKLJUCNA_GRADE, @@ -496,11 +497,12 @@ class gsec { var teacher = ist[1].split(": ")[1].trim(); var subject = ist[2].split(": ")[1].trim(); var name = []; - - name.push(ist[3].split(": ")[1].trim()) - name.push(ist[4].split(": ")[1].trim()) - name.push(ist[5].split(": ")[1].trim()) - + + name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Ocenjevanje: ")[1].split("\nVrsta: ")[0].trim()); + name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Vrsta: ")[1].split("\nRok: ")[0].trim()) + name.push(whatever_ist_meant_in_my_head_back_then_but_as_a_string.split("Rok: ")[1].trim()) + // prov predstavljam si enga profesorja, ke bo v polje Ocenjevanje vnesel "Vrsta: " in spet BREAKAL + // FKING algoritem. var gradeNumber = Number(grade.getElementsByTagName("span")[0].innerHTML); var temporary = grade.getElementsByTagName("span")[0].classList.contains("ocVmesna"); diff --git a/assets/js/login.js b/assets/js/login.js index fc6dfcd..cdecf38 100644 --- a/assets/js/login.js +++ b/assets/js/login.js @@ -45,7 +45,7 @@ function login() { localforage.setItem("username", username), localforage.setItem("password", password) ]; - read_val(0); + // read_val(0); Promise.all(promises_to_run).then(function () { window.location.replace("/pages/timetable.html"); }); |