From 9c89852e97a667b5ee87af054b7000e9a52fd9d1 Mon Sep 17 00:00:00 2001 From: JoshiCodes <55353244+JoshiCodes@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:34:31 +0100 Subject: [PATCH] fix: register the index.html transformation under the shared pattern File Transformation only runs the callbacks whose pattern string equals the requested path, so the anchored pattern was skipped whenever another plugin had registered the plain one. Script chunks that match the pattern as a regex are returned unchanged. --- .../IndexHtmlTransformerTests.cs | 19 +++++++++++++++++++ .../Injection/FileTransformationRegistrar.cs | 8 +++++--- .../Injection/IndexHtmlTransformer.cs | 8 +++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/Jellyfin.Plugin.Herald.Tests/IndexHtmlTransformerTests.cs b/Jellyfin.Plugin.Herald.Tests/IndexHtmlTransformerTests.cs index abe735b..083d268 100644 --- a/Jellyfin.Plugin.Herald.Tests/IndexHtmlTransformerTests.cs +++ b/Jellyfin.Plugin.Herald.Tests/IndexHtmlTransformerTests.cs @@ -31,6 +31,25 @@ public class IndexHtmlTransformerTests Assert.Equal(Script, IndexHtmlTransformer.Inject(Script)); } + [Fact] + public void Inject_LeavesScriptsThatMentionABodyTagAlone() + { + const string Script = "(self.webpackChunk=self.webpackChunk||[]).push([[17244],{t:\"