diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 19:59:26 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-05-20 19:59:26 +0200 |
commit | cf41a36f744c51513d864b48d7ee806544de062b (patch) | |
tree | 9948a2759b6aab7ec88ab7bdb76ec967d01119da | |
parent | try-catch in fetchTeachers (diff) | |
download | beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar.gz beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar.bz2 beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar.lz beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar.xz beziapp-cf41a36f744c51513d864b48d7ee806544de062b.tar.zst beziapp-cf41a36f744c51513d864b48d7ee806544de062b.zip |
-rwxr-xr-x | dist/js/app.js | 2 | ||||
-rw-r--r-- | dist/js/gsec.js | 29 | ||||
-rwxr-xr-x | dist/pages/about.html | 2 | ||||
-rwxr-xr-x | dist/sw.js | 4 |
4 files changed, 24 insertions, 13 deletions
diff --git a/dist/js/app.js b/dist/js/app.js index 5dfb156..ea25178 100755 --- a/dist/js/app.js +++ b/dist/js/app.js @@ -3,7 +3,7 @@ const app_version = "1.0.13-beta"; -const previous_commit = "ab5b03d25a201269482acf51e9b856aa62ce2a84"; +const previous_commit = "2acc46724db65edf60a7316086fe098cc7b3f5b3"; if ("serviceWorker" in navigator) { navigator.serviceWorker.register("/sw.js") diff --git a/dist/js/gsec.js b/dist/js/gsec.js index df571f6..088edcb 100644 --- a/dist/js/gsec.js +++ b/dist/js/gsec.js @@ -319,15 +319,26 @@ class gsec { subjects[abkurzung] = subjectName; } - var TP = {}; - TP.day = slDayToInt(DAY_REGEX.exec(subFields[3].innerHTML)[1]); - TP.period = Number(PERIOD_REGEX.exec(subFields[3].innerHTML)[1]); - var time_range_matches = TIME_RANGE_REGEX.exec(subFields[3].innerHTML); - TP.from = time_range_matches[1]; - TP.till = time_range_matches[2]; - if (TP.day < 0) { // indexOf vrne -1, če v arrayu ne najde dneva ( ) - TP = false; - } + try { + var TP = {}; + TP.day = slDayToInt(DAY_REGEX.exec(subFields[3].innerHTML)[1]); + TP.period = Number(PERIOD_REGEX.exec(subFields[3].innerHTML)[1]); + var time_range_matches = TIME_RANGE_REGEX.exec(subFields[3].innerHTML); + TP.from = time_range_matches[1]; + TP.till = time_range_matches[2]; + if (TP.day < 0) { // indexOf vrne -1, če v arrayu ne najde dneva ( ) + TP = false; + } + } catch (error) { + var TP = {}; + TP.day = slDayToInt(subFields[3].innerHTML.split(", ")[0]); + TP.period = Number( subFields[3].innerHTML.split(", ").pop().split(". ura")[0] ); + TP.from = subFields[3].innerHTML.split("(").pop().split(")")[0].split(" - ")[0]; + TP.till = subFields[3].innerHTML.split("(").pop().split(")")[0].split(" - ")[1]; + if (TP.day < 0) { // indexOf vrne -1, če v arrayu ne najde dneva ( ) + TP = false; + } + } Teachers[name] = { "subjects" : subjects , "tpMeetings" : TP }; } diff --git a/dist/pages/about.html b/dist/pages/about.html index dead8ae..ea1a89a 100755 --- a/dist/pages/about.html +++ b/dist/pages/about.html @@ -142,7 +142,7 @@ <div class="row"> <p> <small> - ^HEAD ab5b03d25a201269482acf51e9b856aa62ce2a84 + ^HEAD 2acc46724db65edf60a7316086fe098cc7b3f5b3 </small> </p> </div> @@ -3,8 +3,8 @@ // Change version to cause cache refresh -const static_cache_name = "site-static-1.0.13-beta-ab5b03d"; -// commit before the latest is ab5b03d25a201269482acf51e9b856aa62ce2a84 +const static_cache_name = "site-static-1.0.13-beta-2acc467"; +// commit before the latest is 2acc46724db65edf60a7316086fe098cc7b3f5b3 // Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js // sw.js NE SME BITI CACHAN, ker vsebuje verzijo! |