Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

Remove useles </div> (i think) & some JS cookie path stuff (#1626)

* Remove useles </div>

* Delete cookie both for current path and general path
Cette révision appartient à :
kilo 2017-10-02 17:59:35 +02:00 révisé par GitHub
Parent 975ae06b7c
révision 30517b314e
2 fichiers modifiés avec 4 ajouts et 4 suppressions

Voir le fichier

@ -113,14 +113,15 @@ function resetCookies() {
//only execute if cookie are supposed to be shared between nyaa & sukebei, aka on host name without subdomain
var cookieValue = getCookieValue(cookieName)
document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;"
document.cookie = cookieName + "=;path=/;expires=Thu, 01 Jan 1970 00:00:00 UTC;"
document.cookie = cookieName + "=" + cookieValue + ";path=/;expires=" + farFutureString + ";domain=" + domain
//Remove cookie and re-create it to ensure domain is correct
//Remove cookie from both current & general path, then re-create it to ensure domain is correct
}
continue
}
if (ignoredCookies.includes(cookieName)) {
if (ignoredCookies.includes(cookieName))
continue
}
document.cookie = cookieName + "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;"
document.cookie = cookieName + "=;path=/;expires=Thu, 01 Jan 1970 00:00:00 UTC;"
}

Voir le fichier

@ -263,6 +263,5 @@
{{ if User.CurrentOrAdmin(UserProfile.ID) }}
<hr/>
<a href="/user/{{UserProfile.ID}}/{{UserProfile.Username}}?delete" onclick="if (!confirm('{{ T("delete_account_confirm") }}')) return false;" class="form-input btn-red">{{ T("delete_account")}}</a>
</div>
{{end}}
{{end}}