From 30517b314e5769600d2c62d0a1f86299b780c783 Mon Sep 17 00:00:00 2001 From: kilo Date: Mon, 2 Oct 2017 17:59:35 +0200 Subject: [PATCH] Remove useles (i think) & some JS cookie path stuff (#1626) * Remove useles * Delete cookie both for current path and general path --- public/js/main.js | 7 ++++--- templates/site/user/edit.jet.html | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/js/main.js b/public/js/main.js index 47a311dc..a0ec2519 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -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;" } diff --git a/templates/site/user/edit.jet.html b/templates/site/user/edit.jet.html index 7166b379..926c596b 100644 --- a/templates/site/user/edit.jet.html +++ b/templates/site/user/edit.jet.html @@ -263,6 +263,5 @@ {{ if User.CurrentOrAdmin(UserProfile.ID) }}
{{ T("delete_account")}} - {{end}} {{end}}