Hehe embedded js go brrr

This commit is contained in:
Tracker-Friendly 2024-03-15 17:01:55 +00:00
parent 8af2206bb3
commit e7cb111ef4
3 changed files with 8 additions and 2 deletions

View File

@ -7,6 +7,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" type="text/css" href="../static/css/style.css">
<link rel="icon" href="./static/svg/favicon.svg">
<script src="../static/js/hash-wasm.js"></script>
<style>
body {

View File

@ -79,7 +79,7 @@
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p>
<br>
<button onclick="history.back()" style="cursor: pointer; padding: 15px 20px;margin-right: auto;color: white;text-decoration: none;background-color: var(--theme-color);border-radius: 8px;border: medium;font-size: 15px;">Take me back where I was!</button>
<button onclick="if (document.referrer !== "") {window.location.href = document.referrer;}else {window.location.href = "https://notes.hectabit.org/login";}" style="cursor: pointer; padding: 15px 20px;margin-right: auto;color: white;text-decoration: none;background-color: var(--theme-color);border-radius: 8px;border: medium;font-size: 15px;">Take me back where I was!</button>
<br><br>
</body>

View File

@ -32,8 +32,13 @@ changeButton.addEventListener("click", (event) => {
if (response.status == 200) {
localStorage.setItem("homeserverURL", remote)
if (document.referrer !== "") {
window.location.href = document.referrer;
}
else {
window.location.href = "https://notes.hectabit.org/login";
}
}
else if (response.status == 404) {
statusBox.innerText = "Not a valid homeserver!"
}