js: bundle jQuery with Webpack.
Include jQuery in our Webpack bundle instead of loading it from CDNJS. This means we no longer load any Javascript libraries from third party sites.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
<link rel="top" title="<%= Danbooru.config.app_name %>" href="/">
|
||||
<%= csrf_meta_tag %>
|
||||
<%= raw Danbooru.config.custom_html_header_content %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<%= javascript_pack_tag "application" %>
|
||||
<%= stylesheet_pack_tag "application" %>
|
||||
<%= yield :html_header %>
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
<% if CurrentUser.user.blacklisted_tags.present? %>
|
||||
<meta name="blacklisted-tags" content="<%= CurrentUser.user.blacklisted_tags.gsub(/(?:\r|\n)+/, ",") %>">
|
||||
<% end %>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
|
||||
<%= javascript_pack_tag "application" %>
|
||||
<%= stylesheet_pack_tag "application" %>
|
||||
<% if CurrentUser.user.custom_style.present? && params.fetch(:css, "true").truthy? %>
|
||||
@@ -123,6 +122,8 @@
|
||||
|
||||
window.Danbooru.notice = Danbooru.Utility.notice;
|
||||
window.Danbooru.error = Danbooru.Utility.error;
|
||||
window.$ = Danbooru.jQuery;
|
||||
window.jQuery = Danbooru.jQuery;
|
||||
</script>
|
||||
|
||||
<%= render "static/footer" %>
|
||||
|
||||
Reference in New Issue
Block a user