X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/e15c00dc2cfdc220be15ce1392d29b238b3d6991..3eda7be919f5b3bd88b5cf85ba1a3c1f72550d6f:/app/assets/javascripts/index.js diff --git a/app/assets/javascripts/index.js b/app/assets/javascripts/index.js index 9ebee2dd2..5f84fb056 100644 --- a/app/assets/javascripts/index.js +++ b/app/assets/javascripts/index.js @@ -171,15 +171,18 @@ $(document).ready(function () { $('.welcome .close-wrap').on('click', function() { $('.welcome').hide(); - $.cookie('_osm_welcome', 'hide', { expires: expiry }); + $.cookie('_osm_welcome', 'hide', { expires: expiry, path: '/' }); }); + var bannerExpiry = new Date(); + bannerExpiry.setYear(bannerExpiry.getFullYear() + 1); + $('#banner .close-wrap').on('click', function(e) { var cookieId = e.target.id; $('#banner').hide(); e.preventDefault(); if (cookieId) { - $.cookie(cookieId, 'hide', { expires: expiry }); + $.cookie(cookieId, 'hide', { expires: bannerExpiry, path: '/' }); } });