mirror of
https://gitlab.com/commento/commento.git
synced 2025-06-29 22:56:37 -04:00
self.js: delete invalid cookie before redirecting
This commit is contained in:
@ -75,6 +75,12 @@
|
||||
}
|
||||
|
||||
|
||||
// Deletes a cookie.
|
||||
global.cookieDelete = function(name) {
|
||||
document.cookie = name + '=;expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
||||
}
|
||||
|
||||
|
||||
// Converts a date in the past to a human-friendly duration relative to now.
|
||||
global.timeSince = function(date) {
|
||||
var seconds = Math.floor((new Date() - date) / 1000);
|
||||
|
Reference in New Issue
Block a user