summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@status.net>2010-01-26 01:58:10 +0100
committerSarven Capadisli <csarven@status.net>2010-01-26 01:58:10 +0100
commitd17b7fa19ba2bfec9aa3d734c0f30e001256ddc0 (patch)
tree366e82575e50ea5abd00647e640b4c1ad87536eb /js
parentee4ca8f2601bc5a2dd258fea176037e03e23feb8 (diff)
Setting the geo location cookie expire date far into the future: 2029 ;)
Diffstat (limited to 'js')
-rw-r--r--js/util.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/util.js b/js/util.js
index 8d52d859b..b864867fd 100644
--- a/js/util.js
+++ b/js/util.js
@@ -495,7 +495,7 @@ var SN = { // StatusNet
$('#'+SN.C.S.NoticeLocationId).val('');
$('#'+SN.C.S.NoticeDataGeo).attr('checked', false);
- $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/', expires: SN.U.GetDateFromNow(30) });
+ $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) });
}
function getJSONgeocodeURL(geocodeURL, data) {
@@ -538,7 +538,7 @@ var SN = { // StatusNet
NDG: true
};
- $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/', expires: SN.U.GetDateFromNow(30) });
+ $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) });
});
}
@@ -661,9 +661,9 @@ var SN = { // StatusNet
});
},
- GetDateFromNow: function(days) {
+ GetFullYear: function(year, month, day) {
var date = new Date();
- date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
+ date.setFullYear(year, month, day);
return date;
}