Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Jun 30, 2024
1 parent af9f0c9 commit b80fbaa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,19 @@ export async function handleLogin () {

currentBonus.textContent = `Generous patrons give you a bonus of ${globalBonus}% more Quarks!`

const cookies = parseDocumentCookie()

if (cookies.id || cookies.patreonId) {
Alert('You may need to login to your account again for bonuses to apply! Thank you!')
}

if (cookies.id) document.cookie = 'id=;Max-Age=0'
if (cookies.patreonId) document.cookie = 'patreonId=;Max-Age=0'

if (location.hostname !== 'synergism.cc') {
// TODO: better error, make link clickable, etc.
subtabElement.textContent = 'Login is not available here, go to https://synergism.cc instead!'
} else if (parseDocumentCookie().id || parseDocumentCookie().patreonId) {
} else if (cookies.token) {
if (!member) {
console.log(response, globalBonus, member, personalBonus, document.cookie)
}
Expand Down

0 comments on commit b80fbaa

Please sign in to comment.