Fix cookies not staying across browser sessions
This commit is contained in:
parent
61dd64182e
commit
d153c2b4f0
|
@ -206,7 +206,7 @@ function sendColor(color) {
|
|||
|
||||
function setTimestamp(v) {
|
||||
showTimestamp(v)
|
||||
document.cookie = "timestamp=" + v
|
||||
document.cookie = "timestamp=" + v + "; expires=Fri, 31 Dec 9999 23:59:59 GMT";
|
||||
}
|
||||
|
||||
// Get the websocket setup in a function so it can be recalled
|
||||
|
|
|
@ -86,7 +86,7 @@ func recieve(v []js.Value) {
|
|||
auth = h.Data.(common.CommandLevel)
|
||||
case common.CdColor:
|
||||
color = h.Data.(string)
|
||||
js.Get("document").Set("cookie", fmt.Sprintf("color=%s;", color))
|
||||
js.Get("document").Set("cookie", fmt.Sprintf("color=%s; expires=Fri, 31 Dec 9999 23:59:59 GMT", color))
|
||||
case common.CdEmote:
|
||||
data := h.Data.(map[string]interface{})
|
||||
emoteNames = make([]string, 0, len(data))
|
||||
|
|
Loading…
Reference in New Issue