]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/index.js
Add SOTM advert
[rails.git] / app / assets / javascripts / index.js
index cfee031fd47086d2c530da7a0e12bd6245a2e8cb..c066f8961f3fd2bc6388a0a2829949c68dd28e62 100644 (file)
@@ -154,6 +154,15 @@ $(document).ready(function () {
     $.cookie("_osm_location", OSM.locationCookie(map), { expires: expiry, path: "/" });
   });
 
+  if ($.cookie('_osm_sotm') == 'hide') {
+    $('#sotm').hide();
+  }
+
+  $('#sotm .close').on('click', function() {
+    $('#sotm').hide();
+    $.cookie("_osm_sotm", 'hide', { expires: expiry });
+  });
+
   if ($.cookie('_osm_welcome') == 'hide') {
     $('.welcome').hide();
   }