From 41d0245ac1044b22e25bfdfc5b20c17e68c384e4 Mon Sep 17 00:00:00 2001 From: Hao_Tian22 Date: Sat, 28 Jan 2023 02:38:57 +0800 Subject: [PATCH 1/2] purecool Login-Fix --- theme/purecool.html | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) 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(); From f9ce32d8991a737b7d9e5fab7d0a42aa10ecc1fd Mon Sep 17 00:00:00 2001 From: Hao_Tian22 Date: Sat, 28 Jan 2023 02:48:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BC=95=E5=85=A5sha1.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/purecool.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/theme/purecool.html b/theme/purecool.html index ed1282b..a9231ab 100644 --- a/theme/purecool.html +++ b/theme/purecool.html @@ -1281,6 +1281,9 @@ document.getElementById('password1').focus(); + + +