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) {
|
function setTimestamp(v) {
|
||||||
showTimestamp(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
|
// 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)
|
auth = h.Data.(common.CommandLevel)
|
||||||
case common.CdColor:
|
case common.CdColor:
|
||||||
color = h.Data.(string)
|
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:
|
case common.CdEmote:
|
||||||
data := h.Data.(map[string]interface{})
|
data := h.Data.(map[string]interface{})
|
||||||
emoteNames = make([]string, 0, len(data))
|
emoteNames = make([]string, 0, len(data))
|
||||||
|
|
Loading…
Reference in New Issue