Hehe embedded js go brrr

This commit is contained in:
Tracker-Friendly 2024-03-15 17:01:55 +00:00
parent 8af2206bb3
commit 27d643df3f
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 http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <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="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> <script src="../static/js/hash-wasm.js"></script>
<style> <style>
body { body {

View File

@ -79,7 +79,7 @@
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.</p> SUCH DAMAGES.</p>
<br> <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> <br><br>
</body> </body>

View File

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