mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 17:17:02 +00:00
delete all client side cookies.
This commit is contained in:
parent
e4e6bcae1d
commit
70126a302a
1 changed files with 18 additions and 0 deletions
|
@ -76,6 +76,24 @@ define(['app',
|
|||
else {
|
||||
window.document.title = title + ' - NzbDrone';
|
||||
}
|
||||
|
||||
this._clearCookies();
|
||||
},
|
||||
|
||||
_clearCookies: function () {
|
||||
|
||||
if (!document.cookie) {
|
||||
return;
|
||||
}
|
||||
|
||||
var cookies = document.cookie.split(";");
|
||||
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = cookies[i];
|
||||
var eqPos = cookie.indexOf("=");
|
||||
var name = eqPos > -1 ? cookie.substr(0, eqPos) :cookie;
|
||||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue