diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index a59a94d2c..3a85d72fe 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -552,14 +552,14 @@ Danbooru.Post.notice_update = function(x) { if (x === "inc") { Danbooru.Post.pending_update_count += 1; - Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)..."); + Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...", true); } else { Danbooru.Post.pending_update_count -= 1; if (Danbooru.Post.pending_update_count < 1) { Danbooru.notice("Posts updated"); } else { - Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)..."); + Danbooru.notice("Updating posts (" + Danbooru.Post.pending_update_count + " pending)...", true); } } } diff --git a/app/assets/javascripts/utility.js b/app/assets/javascripts/utility.js index 903ab21f2..e0941f5ca 100644 --- a/app/assets/javascripts/utility.js +++ b/app/assets/javascripts/utility.js @@ -21,11 +21,13 @@ $('html, body').animate({scrollTop: top}, 300, "linear", function() {Danbooru.scrolling = false;}); } - Danbooru.notice = function(msg) { + Danbooru.notice = function(msg, permanent) { $('#notice').addClass("ui-state-highlight").removeClass("ui-state-error").fadeIn("fast").children("span").html(msg); - setTimeout(function() { - $("#close-notice-link").click(); - }, 6000); + if (!permanent) { + setTimeout(function() { + $("#close-notice-link").click(); + }, 6000); + } } Danbooru.error = function(msg) {