From 46f7aedadd9c6b1bb64e72c4c0770d9b1030454f Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Mon, 14 Nov 2016 21:59:56 +0100 Subject: [PATCH 1/1] make the JS compatible with older IE versions, though this is a hack that hardcodes unrelated class names --- authsystem.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/authsystem.js b/authsystem.js index 2e21b0f..faaf975 100644 --- a/authsystem.js +++ b/authsystem.js @@ -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"); + } } } -- 2.35.3