summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-13 14:27:34 +0100
committerAnton Luka Šijanec <sijanecantonluka@gmail.com>2020-03-13 14:27:34 +0100
commit2354d7e7986915713d76ccb7c96d3dcec6c2a38c (patch)
treec031539de69da8ddc1de1ff52102146e84ba8148
parent1.0.12.54-beta: gsec.js stuff (diff)
downloadbeziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar.gz
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar.bz2
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar.lz
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar.xz
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.tar.zst
beziapp-2354d7e7986915713d76ccb7c96d3dcec6c2a38c.zip
-rw-r--r--js/gsec.js10
-rw-r--r--sw.js2
2 files changed, 6 insertions, 6 deletions
diff --git a/js/gsec.js b/js/gsec.js
index 6e59db7..8d02d44 100644
--- a/js/gsec.js
+++ b/js/gsec.js
@@ -21,7 +21,7 @@ class gsec {
type: "GET",
dataType: "html",
success: (getData) => {
- var parsed = document.createElement("html");
+ var parsed = document.createElement("template");
parsed.innerHTML = getData;
if(formId == null) {
var form = parsed.getElementsByTagName("form")[0];
@@ -63,7 +63,7 @@ class gsec {
return new Promise((resolve, reject) => {
var dataToSend = {"edtGSEUserId": usernameToLogin, "edtGSEUserPassword": passwordToLogin, "btnLogin": "Prijava"};
this.postback(GSE_URL+"Logon.aspx", dataToSend).then( (response) => {
- var parsed = document.createElement("html");
+ var parsed = document.createElement("template");
parsed.innerHTML = response.data;
if(response.code == 302) {
resolve(true);
@@ -150,7 +150,7 @@ class gsec {
return new Promise((resolve, reject) => {
var urnik = { 0: {}, 1: {}, 2: {}, 3: {}, 4: {}, 5: {}, 6:{} } ;
this.postback(GSE_URL+"Page_Gim/Ucenec/DnevnikUcenec.aspx", dataToSend, null, true).then( (response) => {
- var parsed = document.createElement("html");
+ var parsed = document.createElement("template");
parsed.innerHTML = response.data;
for(const urnikElement of parsed.querySelectorAll('*[id^="ctl00_ContentPlaceHolder1_wkgDnevnik_btnCell_"]')) {
var subFields = urnikElement.id.split("_");
@@ -172,7 +172,7 @@ class gsec {
return new Promise((resolve, reject) => {
var gradings = [];
this.postback(GSE_URL+"Page_Gim/Ucenec/IzpitiUcenec.aspx", {}, null, true).then( (response) => {
- var parsed = document.createElement("html");
+ var parsed = document.createElement("template");
parsed.innerHTML = response.data;
var rowElements = parsed.getElementsByTagName("table")[0].getElementsByTagName("tbody")[0].getElementsByTagName("tr");
for (const row of rowElements) {
@@ -197,7 +197,7 @@ class gsec {
return new Promise((resolve, reject) => {
var Teachers = {};
this.postback(GSE_URL+"Page_Gim/Ucenec/UciteljskiZbor.aspx", {}, null, true).then((response)=>{
- var parsed = document.createElement("html");
+ var parsed = document.createElement("template");
parsed.innerHTML = response.data;
var rowElements = parsed.getElementsByTagName("table")[0].getElementsByTagName("tbody")[0].getElementsByTagName("tr");
for(const row of rowElements) {
diff --git a/sw.js b/sw.js
index 091edd5..371523c 100644
--- a/sw.js
+++ b/sw.js
@@ -1,5 +1,5 @@
// Change version to cause cache refresh
-const static_cache_name = "site-static-v1.0.12.54";
+const static_cache_name = "site-static-v1.0.12.55";
// Got them with find . -not -path '*/\.*' | sed "s/.*/\"&\",/" | grep -v sw.js
// sw.js NE SME BITI CACHAN, ker vsebuje verzijo!