summaryrefslogtreecommitdiffstats
path: root/assets/js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js')
-rw-r--r--assets/js/main.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/assets/js/main.js b/assets/js/main.js
new file mode 100644
index 0000000..c19eb0f
--- /dev/null
+++ b/assets/js/main.js
@@ -0,0 +1,10 @@
+if (document.location.protocol != "https:"
+ && (
+ window.location.hostname.endsWith("sijanec.eu")
+ || window.location.hostname.endsWith("xn--ijanec-9jb.eu"))) {
+ fetch("/?preveri-https").then((response)=>{
+ document.getElementById("ponudi-https").hidden = false;
+ }).catch((error)=>{
+ console.log("ne bom predlagal HTTPS, ker HTTPS ne deluje, ker: "+error);
+ });
+}