This commit is contained in:
r888888888
2014-08-18 13:13:49 -07:00
parent 1f4811dcf7
commit 461f3b4a4d
32 changed files with 2 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
(function() {
Danbooru.NewsUpdate = {};
Danbooru.NewsUpdate.initialize = function() {
var key = $("#news-updates").data("id");
if (Danbooru.Cookie.get("news-ticker") == key) {
$("#news-updates").hide();
} else {
$("#news-updates").show();
$("#close-news-ticker-link").click(function(e) {
$("#news-updates").hide();
Danbooru.Cookie.put("news-ticker", key);
// need to reset the more link
var $site_map_link = $("#site-map-link");
$("#more-links").hide().offset({top: $site_map_link.offset().top + $site_map_link.height() + 10, left: $site_map_link.offset().left});
return false;
});
}
}
})();
$(function() {
Danbooru.NewsUpdate.initialize();
});