diff options
author | sijanec <anton@sijanec.eu> | 2021-04-11 00:24:44 +0200 |
---|---|---|
committer | sijanec <anton@sijanec.eu> | 2021-04-11 00:24:44 +0200 |
commit | 2adda1079a19bc3eb6d9457e85aacd0318efc4db (patch) | |
tree | cde3f67d63bfd865eed96c231318a4281860ec13 /assets | |
parent | fixed styles for min-width and textaress (diff) | |
download | sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar.gz sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar.bz2 sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar.lz sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar.xz sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.tar.zst sijanec.eu-2adda1079a19bc3eb6d9457e85aacd0318efc4db.zip |
Diffstat (limited to 'assets')
-rw-r--r-- | assets/js/main.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index edbed49..1faa8fe 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -20,4 +20,13 @@ if (document.location.protocol != "https:" console.log("ne bom predlagal HTTPS, ker HTTPS ne deluje, ker: "+error); }); } -document.querySelectorAll(".commentform").forEach((c)=>{c.parentElement.previousElementSibling.checked=false}); // enovrstičnica, ki skrije komentar-forme, če checkbox statusi ostanejo po reloadu. +document.querySelectorAll(".commentform").forEach((c)=>{c.parentElement.previousElementSibling.checked=false}); // enovrstičnica, ki skrije komentar-forme, če checkbox statusi ostanejo po reloadu. (firefox) +document.querySelectorAll(".yesscript").forEach((c)=>{c.style.display="block"}); /* enovrstičnica, ki s classom naredi alt noscri */ +document.querySelectorAll(".noscript").forEach((c)=>{c.hidden=true}); /* enovrstičnica, ki z atributom naredi alternativ noscript */ +if (window.isSecureContext) { /* večvrstičnica, ki bodisi skrije bodisi pokaže yessecurecontext in nosecurecontext elemente */ + document.querySelectorAll(".yessecurecontext").forEach((c)=>{c.hidden=false}); + document.querySelectorAll(".nosecurecontext").forEach((c)=>{c.hidden=true}); +} else { + document.querySelectorAll(".nosecurecontext").forEach((c)=>{c.hidden=false}); + document.querySelectorAll(".yessecurecontext").forEach((c)=>{c.hidden=true}); +} |