summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/js/gsec.js14
-rw-r--r--assets/js/login.js2
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");
});