diff --git a/theme/purecool.html b/theme/purecool.html index 3e2d88a..ed1282b 100644 --- a/theme/purecool.html +++ b/theme/purecool.html @@ -457,8 +457,9 @@
-
+ +
@@ -1246,6 +1247,35 @@ document.getElementById('login_div').style.top=(window.innerHeight-document.getElementById('login_div').offsetHeight)/2+document.body.scrollTop +'px'; document.getElementById('login_input').focus(); } + function sha1loginpass(f) { + if (f.password1.value == "") return false; + try { + timestamp = new Date().getTime() + ""; + timestamp = timestamp.substr(0, timestamp.length - 3); + f.timestamp.value = timestamp; + f.password1.value = sha1(timestamp + "" + f.password1.value); + return true; + } catch { + //alert("sha1.js not loaded."); + if (confirm("sha1.js not loaded.\n\nLoad from program?")) loadjs("?jsFile=sha1.min.js"); + return false; + } + } + function loadjs(url) { + var xhr = new XMLHttpRequest; + xhr.open("GET", url); + xhr.onload = function (e) { + if (xhr.status == 200) { + var script = document.createElement("script"); + script.type = "text/javascript"; + script.text = xhr.responseText; + document.body.appendChild(script); + } else { + console.log(xhr.response); + } + } + xhr.send(null); + } document.getElementById('password1').focus();