1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-23 08:13:27 +00:00

(web) #5138 'sort setting lost after some days' -- set the cookies to expire after a year, rather than a month.

This commit is contained in:
Jordan Lee 2013-01-05 03:29:22 +00:00
parent 5b89991e51
commit 0644020154

View file

@ -196,9 +196,8 @@ Prefs.setValue = function(key, val)
if (!(key in Prefs._Defaults))
console.warn("unrecognized preference key '%s'", key);
var days = 30;
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
date.setFullYear (date.getFullYear() + 1);
document.cookie = key+"="+val+"; expires="+date.toGMTString()+"; path=/";
};