diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-06-08 15:21:59 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-06-08 15:21:59 +0200 |
commit | 134d89078f864250abf340713edc1d23d90ede24 (patch) | |
tree | 386288c539024d6692c8244e491e1828090dfc91 /assets | |
parent | terms of service css fix - who reads those? (diff) | |
download | beziapp-134d89078f864250abf340713edc1d23d90ede24.tar beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.gz beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.bz2 beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.lz beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.xz beziapp-134d89078f864250abf340713edc1d23d90ede24.tar.zst beziapp-134d89078f864250abf340713edc1d23d90ede24.zip |
Diffstat (limited to 'assets')
-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"); }); |