From 2adda1079a19bc3eb6d9457e85aacd0318efc4db Mon Sep 17 00:00:00 2001 From: sijanec Date: Sun, 11 Apr 2021 00:24:44 +0200 Subject: dodal drugo objavo --- assets/js/main.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'assets') 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}); +} -- cgit v1.2.3