summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
Diffstat (limited to 'assets')
-rw-r--r--assets/js/main.js11
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});
+}