visual tweaks and minor script improvement

This commit is contained in:
Thomas Lynch
2021-11-24 06:02:39 +11:00
parent 9f26e53798
commit 77ad645815
2 changed files with 15 additions and 11 deletions

View File

@ -20,7 +20,7 @@ if (window.Worker) {
submitButton.disabled = false; submitButton.disabled = false;
submitButton.value = 'Submit'; submitButton.value = 'Submit';
} else { } else {
window.location=location.search.slice(1)+location.hash;; window.location=location.search.slice(1)+location.hash || "/";
} }
}, dummyTime); }, dummyTime);
} }

View File

@ -19,34 +19,38 @@ local body_template = [[
<html> <html>
<head> <head>
<meta name='viewport' content='width=device-width initial-scale=1'> <meta name='viewport' content='width=device-width initial-scale=1'>
<title>Solve this captcha...</title> <title>Hold on...</title>
<style> <style>
:root{--text-color:#c5c8c6;--bg-color:#1d1f21} :root{--text-color:#c5c8c6;--bg-color:#1d1f21}
@media (prefers-color-scheme:light){:root{--text-color:#333;--bg-color:#EEE}} @media (prefers-color-scheme:light){:root{--text-color:#333;--bg-color:#EEE}}
.h-captcha{min-height:85px;display:block} .h-captcha{min-height:85px;display:block}
.red{color:red;font-weight:bold}
a,a:visited{color:var(--text-color)} a,a:visited{color:var(--text-color)}
body,html{height:100vh} body,html{height:100vh}
body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Helvetica,Arial,sans-serif;text-align:center;margin:0} body{display:flex;flex-direction:column;background-color:var(--bg-color);color:var(--text-color);font-family:Helvetica,Arial,sans-serif;text-align:center;margin:0}
h3,p{margin:0} h3,p{margin:3px}
footer{font-size:small;margin-top:auto;margin-bottom:50px}h3{padding-top:30vh} footer{font-size:small;margin-top:auto;margin-bottom:50px}h3{padding-top:30vh}
</style> </style>
<noscript>
<style>.jsonly{display:none}</style>
</noscript>
</head> </head>
<body data-pow="%s"> <body data-pow="%s">
<h3>Captcha completion required</h3> <h3>Checking your browser for robots...</h3>
<p>We have detected unusual activity on the requested resource.</p> <p>We have detected unusual activity.</p>
<p>Please solve this captcha to prove you are not a robot.</p> <p>Solve the captcha to continue.</p>
<noscript>
<p class="red">JavaScript is required on this page.</p>
</noscript>
<div> <div>
<br> <br>
</div> </div>
<noscript> <form class="jsonly" method="POST">
<p class="red">JavaScript is required to complete the captcha.</p>
</noscript>
<form method="POST">
<div class="h-captcha" data-sitekey="%s"></div> <div class="h-captcha" data-sitekey="%s"></div>
<script src="https://hcaptcha.com/1/api.js" async defer></script> <script src="https://hcaptcha.com/1/api.js" async defer></script>
<input type="submit" value="Calculating proof of work..." disabled> <input type="submit" value="Calculating proof of work..." disabled>
</form> </form>
<footer>Supported by <a href="https://kikeflare.com">KikeFlare</a></footer> <footer>DDoS mitigation by <a href="https://kikeflare.com">KikeFlare</a></footer>
<script src="/sha1.js"></script> <script src="/sha1.js"></script>
</body> </body>
</html> </html>