X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=js%2Futil.js;h=b864867fd17d12114092c3a9bb5ea5c9b0865fb1;hb=72037d61436978daa1edbd19d52b7e6fc6ae1fa8;hp=a7339010a7b206218a9955c7730da97355a3ca23;hpb=a7a0041a1157ad3ceec2ebd6af722a2529ad422f;p=quix0rs-gnu-social.git diff --git a/js/util.js b/js/util.js index a7339010a7..b864867fd1 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'); + $.cookie(SN.C.S.NoticeDataGeoCookie, 'disabled', { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) }); } function getJSONgeocodeURL(geocodeURL, data) { @@ -537,7 +537,8 @@ var SN = { // StatusNet NLNU: location.url, NDG: true }; - $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue)); + + $.cookie(SN.C.S.NoticeDataGeoCookie, JSON.stringify(cookieValue), { path: '/', expires: SN.U.GetFullYear(2029, 0, 1) }); }); } @@ -658,6 +659,13 @@ var SN = { // StatusNet } return false; }); + }, + + GetFullYear: function(year, month, day) { + var date = new Date(); + date.setFullYear(year, month, day); + + return date; } },