From 0644020154fa3837207d7731cb48a73ee6f7b0f7 Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sat, 5 Jan 2013 03:29:22 +0000 Subject: [PATCH] (web) #5138 'sort setting lost after some days' -- set the cookies to expire after a year, rather than a month. --- web/javascript/common.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/javascript/common.js b/web/javascript/common.js index 59070fdec..5eccb4d03 100644 --- a/web/javascript/common.js +++ b/web/javascript/common.js @@ -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=/"; };