Revert "remove global danbooru object js in default layout"

This reverts commit 68e7de1fc4.
This commit is contained in:
Albert Yi
2018-09-04 14:26:37 -07:00
parent 3987f45362
commit c3b17f5fcc

View File

@@ -71,6 +71,20 @@
}
</script>
<script defer src="https://use.fontawesome.com/releases/v5.0.10/js/all.js" integrity="sha384-slN8GvtUJGnv6ca26v8EzVaR9DC58QEwsIk9q1QXdCU8Yu8ck/tL/5szYlBbqmS+" crossorigin="anonymous"></script>
<script>
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);
}
</script>
</head>
<%= tag.body **body_attributes(CurrentUser.user) do %>
<header id="top">