diff --git a/app/views/articles/edit.html.erb b/app/views/articles/edit.html.erb index b5d8d2f15..a5fb5795b 100644 --- a/app/views/articles/edit.html.erb +++ b/app/views/articles/edit.html.erb @@ -27,7 +27,7 @@ <% end %> -<%= javascript_include_tag "https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-loader.js", defer: true %> +<%= render "shared/webcomponents_loader_script" %> <%= javascript_pack_tag "clipboardCopy", defer: true %> <%= javascript_pack_tag "articleForm", defer: true %> <%= render "articles/v2_form", article: @article, organizations: @organizations, version: @version %> diff --git a/app/views/articles/new.html.erb b/app/views/articles/new.html.erb index b01df17eb..f82b3983a 100644 --- a/app/views/articles/new.html.erb +++ b/app/views/articles/new.html.erb @@ -1,7 +1,7 @@ <% title "New Post" %> <% if user_signed_in? %> - <%= javascript_include_tag "https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-loader.js", defer: true %> + <%= render "shared/webcomponents_loader_script" %> <%= javascript_pack_tag "clipboardCopy", defer: true %> <%= javascript_pack_tag "articleForm", defer: true %> <%= render "articles/v2_form", article: @article, organizations: @organizations, version: @version %> diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb index d97596d33..faf618d22 100644 --- a/app/views/articles/show.html.erb +++ b/app/views/articles/show.html.erb @@ -1,11 +1,13 @@ <% title @article.title %> -<%= javascript_include_tag "https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-loader.js", defer: true %> +<%= render "shared/webcomponents_loader_script" %> <%= javascript_pack_tag "clipboardCopy", defer: true %> <% cache("content-related-optional-scripts-#{@article.id}-#{@article.updated_at}", expires_in: 30.hours) do %> <% if @article.processed_html.include? "ltag_gist-liquid-tag" %> - <%= javascript_include_tag "https://cdnjs.cloudflare.com/ajax/libs/postscribe/2.0.8/postscribe.min.js", defer: true %> + diff --git a/app/views/users/_org_admin.html.erb b/app/views/users/_org_admin.html.erb index 40043424f..30827b4c4 100644 --- a/app/views/users/_org_admin.html.erb +++ b/app/views/users/_org_admin.html.erb @@ -1,6 +1,6 @@ <%= javascript_pack_tag "colorPreview", defer: true %> -<%= javascript_include_tag "https://unpkg.com/@webcomponents/webcomponentsjs@2.2.10/webcomponents-loader.js", defer: true %> +<%= render "shared/webcomponents_loader_script" %> <%= javascript_pack_tag "clipboardCopy", defer: true %>