diff --git a/web/static/app.js b/web/static/app.js index 33d6ccf..1d6e0ec 100644 --- a/web/static/app.js +++ b/web/static/app.js @@ -560,33 +560,34 @@ function scrollToCurrentTrack() { // ── Boot ────────────────────────────────────────────────────────────────────── +// Replace text and tune font so the symbol fills ~¾ of the button. +// Centering is already handled by flex on .btn. +// Defined outside if-block — function declarations inside blocks are +// forbidden in strict mode on older engines and can kill the whole script. +function legacySym(id, text, size) { + var el = $(id); + el.textContent = text; + el.style.fontSize = size; + el.style.fontWeight = 'bold'; + el.style.letterSpacing = '2px'; +} + // Replace emoji with legacy symbols on iOS 9 where the glyphs are missing. -// Centering is already handled by flex on .btn — we only set size/weight here. if (isLegacyIOS) { - // Helper: replace text and tune font so the symbol fills ~¾ of the button. - function legacySym(id, text, size, weight) { - var el = $(id); - el.textContent = text; - el.style.fontSize = size; - el.style.fontWeight = weight || 'bold'; - el.style.letterSpacing = '2px'; - } - // Transport controls (btn-h = 64px): - // two-char symbols (<<, >>) → 26px bold; single-char (■) → 36px bold. - // ▶ is natively supported on iOS 9 and already 32px via .btn-play. - legacySym('btn-prev', SYM.prev, '26px'); // << - legacySym('btn-play', SYM.play, '36px'); // ▶ - legacySym('btn-stop', SYM.stop, '36px'); // ■ - legacySym('btn-next', SYM.next, '26px'); // >> - - // Volume mute (48px tall): short text, large and bold + // two-char symbols (<<, >>) → 26px bold; single-char (■ ▶) → 36px bold. + legacySym('btn-prev', SYM.prev, '26px'); + legacySym('btn-play', SYM.play, '36px'); + legacySym('btn-stop', SYM.stop, '36px'); + legacySym('btn-next', SYM.next, '26px'); + + // Volume mute (48px tall) legacySym('btn-mute', SYM.volOn, '16px'); // Playlist action button (52px tall) legacySym('btn-show-playlist', SYM.playlist, '18px'); - // Kill button: just drop the emoji, keep the label text + // Kill button: drop the emoji, keep the label $('btn-kill').textContent = SYM.skip + ' Überspringen'; }