js: clean up notice/error messaging.

This commit is contained in:
evazion
2019-08-14 01:46:44 -05:00
parent e000bdb861
commit 8d07ad7390
22 changed files with 50 additions and 64 deletions

View File

@@ -78,14 +78,10 @@
if (typeof window.Danbooru !== "object") {
window.Danbooru = {};
}
window.Danbooru.notice = function(msg) {
console.warn("Danbooru.notice will be deprecated. Use $(window).trigger('danbooru:notice', msg) instead.")
$(window).trigger("danbooru:notice", msg);
}
window.Danbooru.error = function(msg) {
console.warn("Danbooru.error will be deprecated. Use $(window).trigger('danbooru:error', msg) instead.")
$(window).trigger("danbooru:error", msg);
}
window.Danbooru.notice = Danbooru.Utility.notice;
window.Danbooru.error = Danbooru.Utility.error;
window._paq = window._paq || [];
<% if CurrentUser.is_member? && !CurrentUser.opt_out_tracking? %>
window._paq.push(["setUserId", '<%= CurrentUser.id %>']);