]> cat aescling's git repositories - mastodon.git/commitdiff
Replace preload link tag to Rails helper (#7192)
authorYamagishi Kazutoshi <ykzts@desire.sh>
Fri, 20 Apr 2018 00:06:53 +0000 (09:06 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 20 Apr 2018 00:06:53 +0000 (02:06 +0200)
app/views/home/index.html.haml

index 8c88d2d64fe870bf39ef18143536c5f2900f180f..7b1a7e50aea4fa348fbcb56ffa0ebc3757955299 100644 (file)
@@ -1,8 +1,9 @@
 - content_for :header_tags do
-  %link{ href: asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
-  %link{ href: asset_pack_path('features/compose.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
-  %link{ href: asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
-  %link{ href: asset_pack_path('features/notifications.js'), crossorigin: 'anonymous', rel: 'preload', as: 'script' }/
+  = preload_link_tag asset_pack_path('features/getting_started.js'), crossorigin: 'anonymous'
+  = preload_link_tag asset_pack_path('features/compose.js'), crossorigin: 'anonymous'
+  = preload_link_tag asset_pack_path('features/home_timeline.js'), crossorigin: 'anonymous'
+  = preload_link_tag asset_pack_path('features/notifications.js'), crossorigin: 'anonymous'
+
   %meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key}
   %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)