From: Robert Kaiser Date: Mon, 14 Nov 2016 20:59:56 +0000 (+0100) Subject: make the JS compatible with older IE versions, though this is a hack that hardcodes... X-Git-Url: https://git-public.kairo.at/?p=authserver.git;a=commitdiff_plain;h=46f7aedadd9c6b1bb64e72c4c0770d9b1030454f;hp=b0e48c35c57284bf91bb8b3dc2da4c8a3206617c make the JS compatible with older IE versions, though this is a hack that hardcodes unrelated class names --- 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"); + } } }