Insert more line breaks

This commit is contained in:
Christoph Hagen
2025-01-27 07:56:07 +01:00
parent 5937369223
commit 09b1f48aea
5 changed files with 17 additions and 11 deletions

View File

@@ -18,14 +18,14 @@ struct AudioPlayerScript: HtmlProducer {
}
func populate(_ result: inout String) {
result += "<script>window.onload = () => { "
result += "<script>\nwindow.onload = () => { "
result += "Amplitude.init({ songs: "
let songData = try! JSONEncoder().encode(items)
result += String(data: songData, encoding: .utf8)!
result += "}); }; " // Close Amplitude.init and window.onload
result += "}); };\n" // Close Amplitude.init and window.onload
result += "function playEntry(index) { Amplitude.playSongAtIndex(index) };"
result += animatePlaylist
result += "</script>"
result += "\n</script>"
}
private var animatePlaylist: String {