diff --git a/app/static/script.js b/app/static/script.js index 9282d56..468719d 100644 --- a/app/static/script.js +++ b/app/static/script.js @@ -244,7 +244,9 @@ function teamRow(game, side, state) { const sogHtml = (state === 'live' || state === 'final') && sog !== undefined ? `${sog} SOG` : ''; - const ppHtml = state === 'live' && pp ? teamPpIndicator(pp) : ''; + const ppHtml = state === 'live' && pp + ? teamPpIndicator(pp, game['Intermission']) + : ''; const subParts = [sogHtml, ppHtml].filter(Boolean).join(''); const subline = subParts ? `
${subParts}
` : ''; @@ -264,8 +266,11 @@ function teamRow(game, side, state) { `; } -function teamPpIndicator(pp) { +function teamPpIndicator(pp, intermission) { const timeStr = pp.replace('PP ', ''); + if (intermission) { + return `PP ${timeStr}`; + } const seconds = timeToSeconds(timeStr); const attrs = `data-seconds="${seconds}" data-received-at="${Date.now()}" data-pp-clock`; return `PP ${timeStr}`;