Skip to content

Commit

Permalink
Hack login-signup on login page to display correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekiah-A committed Sep 10, 2024
1 parent e2b9ad8 commit 8de4a78
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions login.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@
</head>
<body class="headered-body">
<subliminal-header nologin="true"></subliminal-header>
<login-signup id="loginSignup" nocancel="true"></login-signup>
<login-signup id="loginSignup" nocancel="true" style="top: 50%;transform: translateY(-50%);"></login-signup>
<a href="./" class="back"> &lt;- Back</a>
</body>
<script>
const params = new URLSearchParams(window.location.search);
const referrer = params.get("referrer")

// TODO: Kinda hacky
loginSignup.login.show()
loginSignup.login.style.top = "50%"
loginSignup.login.style.transform = "translateY(-50%)"

loginSignup.addEventListener("finished", (e) => {
if (referrer) {
window.location.href = window.location.origin + referrer
return
}

window.location.href = window.location.origin
})
</script>
Expand Down

0 comments on commit 8de4a78

Please sign in to comment.