diff --git a/shaarli-pro/js/script.js b/shaarli-pro/js/script.js index 75af66d..4b10ba6 100644 --- a/shaarli-pro/js/script.js +++ b/shaarli-pro/js/script.js @@ -1186,7 +1186,7 @@ document.addEventListener('DOMContentLoaded', () => { const theme = isDark ? 'dark' : 'light'; var lines = []; lines.push(''); - lines.push(''); + lines.push(''); lines.push('
'); lines.push(''); lines.push(''); @@ -1206,7 +1206,7 @@ document.addEventListener('DOMContentLoaded', () => { lines.push(' --danger: #ef4444;'); lines.push(' --shadow: 0 1px 3px rgba(0,0,0,0.1);'); lines.push('}'); - lines.push('[data-theme="' + theme + '"] {'); + lines.push('[data-theme="dark"] {'); lines.push(' --primary: #3b82f6;'); lines.push(' --primary-hover: #60a5fa;'); lines.push(' --primary-light: rgba(59,130,246,0.12);'); @@ -1744,7 +1744,7 @@ document.addEventListener('DOMContentLoaded', () => { ); // Revoke the blob URL after a short delay (popup already loaded) - setTimeout(function() { URL.revokeObjectURL(blobUrl); }, 5000); + setTimeout(function () { URL.revokeObjectURL(blobUrl); }, 5000); if (!playerPopup) { // Popup was blocked - fallback to inline player @@ -1767,7 +1767,7 @@ document.addEventListener('DOMContentLoaded', () => { playerAudio.src = url; playerAudio.volume = parseFloat(playerVolume ? playerVolume.value : 0.8); - playerAudio.play().catch(function() { }); + playerAudio.play().catch(function () { }); updateInlineBar(title, true); } @@ -1825,7 +1825,7 @@ document.addEventListener('DOMContentLoaded', () => { // --- Inline bar controls relay to popup via BroadcastChannel --- if (playerPlayBtn) { - playerPlayBtn.addEventListener('click', function() { + playerPlayBtn.addEventListener('click', function () { if (playerChannel) { playerChannel.postMessage({ type: 'player-toggle' }); } @@ -1844,7 +1844,7 @@ document.addEventListener('DOMContentLoaded', () => { } if (playerProgress) { - playerProgress.addEventListener('input', function() { + playerProgress.addEventListener('input', function () { if (playerChannel) { playerChannel.postMessage({ type: 'player-seek', value: playerProgress.value }); } @@ -1852,7 +1852,7 @@ document.addEventListener('DOMContentLoaded', () => { } if (playerVolume) { - playerVolume.addEventListener('input', function() { + playerVolume.addEventListener('input', function () { if (playerChannel) { playerChannel.postMessage({ type: 'player-volume', value: playerVolume.value }); } @@ -1861,7 +1861,7 @@ document.addEventListener('DOMContentLoaded', () => { } if (playerVolBtn) { - playerVolBtn.addEventListener('click', function() { + playerVolBtn.addEventListener('click', function () { if (playerChannel) { playerChannel.postMessage({ type: 'player-mute-toggle' }); } @@ -1870,7 +1870,7 @@ document.addEventListener('DOMContentLoaded', () => { // --- Listen for state updates from popup via BroadcastChannel --- if (playerChannel) { - playerChannel.addEventListener('message', function(e) { + playerChannel.addEventListener('message', function (e) { var msg = e.data; if (!msg || !msg.type) return; @@ -1905,7 +1905,7 @@ document.addEventListener('DOMContentLoaded', () => { } // --- Also listen for localStorage changes (fallback) --- - window.addEventListener('storage', function(e) { + window.addEventListener('storage', function (e) { if (e.key === 'mediaPopupState' && e.newValue) { try { var state = JSON.parse(e.newValue); @@ -1918,7 +1918,7 @@ document.addEventListener('DOMContentLoaded', () => { }); // --- Inject play buttons into bookmark cards with media URLs --- - document.querySelectorAll('.link-outer').forEach(function(card) { + document.querySelectorAll('.link-outer').forEach(function (card) { var urlEl = card.querySelector('.link-url'); var titleEl = card.querySelector('.link-title'); if (!urlEl) return; @@ -1942,7 +1942,7 @@ document.addEventListener('DOMContentLoaded', () => { actionsDiv.appendChild(playBtn); } - playBtn.addEventListener('click', function(e) { + playBtn.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); var mediaUrl = isMediaUrl(url) ? url : realUrl;