make the JS compatible with older IE versions, though this is a hack that hardcodes...
authorRobert Kaiser <kairo@kairo.at>
Mon, 14 Nov 2016 20:59:56 +0000 (21:59 +0100)
committerRobert Kaiser <kairo@kairo.at>
Mon, 14 Nov 2016 20:59:56 +0000 (21:59 +0100)
authsystem.js

index 2e21b0f99003529365ed5ac36be482c8f1a840da..faaf975c36c48f34adcc97495bdd3f535f20bdc8 100644 (file)
@@ -5,10 +5,22 @@
 window.onload = function() {
   var jsWarning = document.getElementById("jswarning");
   if (jsWarning) {
-    document.getElementById("jswarning").classList.add("hidden");
+    if (jsWarning.classList) {
+      jsWarning.classList.add("hidden");
+    }
+    else {
+      // IE9 or older (sigh)
+      jsWarning.setAttribute("class", "warn hidden");
+    }
   }
   var loginForm = document.getElementById("loginform");
   if (loginForm) {
-    loginForm.classList.remove("hidden");
+    if (loginForm.classList) {
+      loginForm.classList.remove("hidden");
+    }
+    else {
+      // IE9 or older (sigh)
+      loginForm.setAttribute("class", "loginarea");
+    }
   }
 }