about summary refs log tree commit diff
path: root/app/views
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-16 19:15:05 +0200
committerGitHub <noreply@github.com>2019-08-16 19:15:05 +0200
commite5cee8062f15191d9dd388a65f6caa104abfd559 (patch)
tree0a55913ac7e3f6535bbf43bac7b3342910e3784b /app/views
parent70da6d663078fb7d04aed387ac085afb2e9e2cd2 (diff)
Fix blurhash and autoplay not working on public pages (#11585)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/home/index.html.haml3
-rw-r--r--app/views/layouts/public.html.haml1
-rw-r--r--app/views/public_timelines/show.html.haml1
-rw-r--r--app/views/shares/show.html.haml2
-rw-r--r--app/views/tags/show.html.haml1
5 files changed, 3 insertions, 5 deletions
diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml
index 4c7fac0b6..30c7aab19 100644
--- a/app/views/home/index.html.haml
+++ b/app/views/home/index.html.haml
@@ -5,8 +5,7 @@
   = 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)
-
+  = render_initial_state
   = javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous'
 
 .app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
diff --git a/app/views/layouts/public.html.haml b/app/views/layouts/public.html.haml
index 69738a2f7..b9179e23d 100644
--- a/app/views/layouts/public.html.haml
+++ b/app/views/layouts/public.html.haml
@@ -1,4 +1,5 @@
 - content_for :header_tags do
+  = render_initial_state
   = javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
 
 - content_for :content do
diff --git a/app/views/public_timelines/show.html.haml b/app/views/public_timelines/show.html.haml
index 913d5d855..07215efdf 100644
--- a/app/views/public_timelines/show.html.haml
+++ b/app/views/public_timelines/show.html.haml
@@ -3,7 +3,6 @@
 
 - content_for :header_tags do
   %meta{ name: 'robots', content: 'noindex' }/
-  %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
   = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous'
 
 .page-header
diff --git a/app/views/shares/show.html.haml b/app/views/shares/show.html.haml
index 44b6f145f..f2f5479a7 100644
--- a/app/views/shares/show.html.haml
+++ b/app/views/shares/show.html.haml
@@ -1,5 +1,5 @@
 - content_for :header_tags do
-  %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
+  = render_initial_state
   = javascript_pack_tag 'share', integrity: true, crossorigin: 'anonymous'
 
 #mastodon-compose{ data: { props: Oj.dump(default_props) } }
diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml
index cf4246822..630702277 100644
--- a/app/views/tags/show.html.haml
+++ b/app/views/tags/show.html.haml
@@ -5,7 +5,6 @@
   %meta{ name: 'robots', content: 'noindex' }/
   %link{ rel: 'alternate', type: 'application/rss+xml', href: tag_url(@tag, format: 'rss') }/
 
-  %script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
   = javascript_pack_tag 'about', integrity: true, crossorigin: 'anonymous'
   = render 'og'