From f76ac3e9f5dbb6d9bc928ae40d87101183686e63 Mon Sep 17 00:00:00 2001 From: sijanec Date: Sun, 15 Nov 2020 02:24:46 +0100 Subject: dodal https predlog --- assets/js/main.js | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 assets/js/main.js (limited to 'assets/js/main.js') 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); + }); +} -- cgit v1.2.3