diff --git a/app/views/base/layout.scala.html b/app/views/base/layout.scala.html index f2c82c05cd..a20d2359b8 100644 --- a/app/views/base/layout.scala.html +++ b/app/views/base/layout.scala.html @@ -188,10 +188,7 @@ asyncJs: Boolean = false)(body: Html)(implicit ctx: Context) @if(ctx.requiresFingerprint) { @fingerprintTag } @jsAt(s"compiled/lichess.site${isProd??".min"}.js", async = asyncJs) @moreJs + @embedJs {lichess.quantity=@i18nJsQuantityFunction;@timeagoLocaleScript;} @if(ctx.pageData.inquiry.isDefined) { @jsTag("inquiry.js") } - @embedJs { - lichess.quantity=@i18nJsQuantityFunction; - @timeagoLocaleScript; - } diff --git a/app/views/lobby/home.scala.html b/app/views/lobby/home.scala.html index c42914a409..286ca703f7 100644 --- a/app/views/lobby/home.scala.html +++ b/app/views/lobby/home.scala.html @@ -65,10 +65,10 @@ window.customWS = true; lichess_lobby = { data: @safeJson(data), -playban: @playban.fold(Html("null")){ pb => +playban: @htmlOrNull(playban) { pb => @safeJson(Json.obj("minutes" -> pb.mins, "remainingSeconds" -> (pb.remainingSeconds + 3))) }, -currentGame: @currentGame.fold(Html("null")) { cg => +currentGame: @htmlOrNull(currentGame) { cg => @safeJson(cg.json) }, i18n: @jsI18n()