From 075cae3d55197b96d997d72cfb498c870788453a Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 22 Apr 2025 12:20:54 +0200 Subject: [chore/frontend] Reorder JS a little bit to avoid visible text changes (#4039) --- internal/web/profile.go | 4 ++-- internal/web/thread.go | 2 +- internal/web/web.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'internal/web') diff --git a/internal/web/profile.go b/internal/web/profile.go index e8483921d..dd3ed8e64 100644 --- a/internal/web/profile.go +++ b/internal/web/profile.go @@ -249,7 +249,7 @@ func (m *Module) profileMicroblog(c *gin.Context, p *profile) { }, { Bottom: true, - Src: jsBlurhash, + Src: jsFrontendPrerender, }, }, Extra: map[string]any{ @@ -323,7 +323,7 @@ func (m *Module) profileGallery(c *gin.Context, p *profile) { }, { Bottom: true, - Src: jsBlurhash, + Src: jsFrontendPrerender, }, }, Extra: map[string]any{ diff --git a/internal/web/thread.go b/internal/web/thread.go index 0b296a75b..d46e52ac7 100644 --- a/internal/web/thread.go +++ b/internal/web/thread.go @@ -154,7 +154,7 @@ func (m *Module) threadGETHandler(c *gin.Context) { }, { Bottom: true, - Src: jsBlurhash, + Src: jsFrontendPrerender, }, }, Extra: map[string]any{ diff --git a/internal/web/web.go b/internal/web/web.go index 15814942a..5bccca06d 100644 --- a/internal/web/web.go +++ b/internal/web/web.go @@ -67,9 +67,9 @@ const ( cssSettings = distPathPrefix + "/settings-style.css" cssTag = distPathPrefix + "/tag.css" - jsFrontend = distPathPrefix + "/frontend.js" // Progressive enhancement frontend JS. - jsBlurhash = distPathPrefix + "/blurhash.js" // Blurhash rendering JS. - jsSettings = distPathPrefix + "/settings.js" // Settings panel React application. + jsFrontend = distPathPrefix + "/frontend.js" // Progressive enhancement frontend JS. + jsFrontendPrerender = distPathPrefix + "/frontend_prerender.js" // Frontend JS that should run before page renders. + jsSettings = distPathPrefix + "/settings.js" // Settings panel React application. ) type Module struct { -- cgit v1.2.3