Files
danbooru/app/assets/javascripts/news.js
albert a536a2699b * Renamed moderator/post/dashboard to moderator/post/queue
* Fixed bug with more overlay links being out of place if news listing is closed
2011-10-26 18:00:48 -04:00

26 lines
698 B
JavaScript

(function() {
Danbooru.News = {};
Danbooru.News.initialize = function() {
var key = $("#news-ticker").data("updated-at");
if (Danbooru.Cookie.get("news-ticker") === key) {
$("#news-ticker").hide();
} else {
$("#close-news-ticker-link").click(function(e) {
$("#news-ticker").hide();
Danbooru.Cookie.put("news-ticker", key);
// need to reset the more 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.News.initialize();
});
})();