diff --git a/static/css/app.css b/static/css/app.css index aef5048..bbf8d38 100644 --- a/static/css/app.css +++ b/static/css/app.css @@ -1738,8 +1738,10 @@ body.reader-immersive.reader-show-bottom .reader-overlay { bottom: var(--bar-h) .hl-note-btn { background:none; border:1px solid var(--border); color:var(--fg); padding:2px 6px; border-radius:var(--radius); cursor:pointer; } /* Footnote popover */ -.footnote-popover { position:fixed; z-index:500; max-width:min(400px,90vw); max-height:220px; overflow-y:auto; background:var(--bg-card,#1a1a1a); border:1px solid var(--border); border-radius:var(--radius); padding:10px 28px 10px 12px; box-shadow:0 4px 20px rgba(0,0,0,.6); font-size:0.88em; line-height:1.55; pointer-events:auto; } -.footnote-popover-close { position:absolute; top:4px; right:6px; background:none; border:none; color:var(--fg-muted,#888); cursor:pointer; font-size:14px; padding:2px 4px; line-height:1; } +.footnote-popover { position:fixed; z-index:500; max-width:min(400px,90vw); max-height:220px; overflow-y:auto; background:#1a1a1a; color:#e8e8e8; border:1px solid #444; border-radius:var(--radius); padding:10px 28px 10px 12px; box-shadow:0 4px 20px rgba(0,0,0,.6); font-size:0.88em; line-height:1.55; pointer-events:auto; } +.footnote-popover.reader-theme-sepia { background:#ede0c4; color:#3b2a1a; border-color:#c8b89a; } +.footnote-popover.reader-theme-bright { background:#f0f0f0; color:#111; border-color:#bbb; } +.footnote-popover-close { position:absolute; top:4px; right:6px; background:none; border:none; color:inherit; opacity:0.5; cursor:pointer; font-size:14px; padding:2px 4px; line-height:1; } /* Highlight marks */ .reader-no-bold * { font-weight: normal !important; } diff --git a/static/js/app.js b/static/js/app.js index 0f253a8..f0a0c31 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -2606,7 +2606,7 @@ function sanitizeEpubHtml(html) { doc.querySelectorAll('*').forEach(el => { Array.from(el.attributes).forEach(attr => { - if (attr.name.startsWith('on')) el.removeAttribute(attr.name); + if (attr.name.startsWith('on') || attr.name === 'title') el.removeAttribute(attr.name); }); const tag = el.tagName.toLowerCase(); if (tag === 'img') { @@ -4897,6 +4897,10 @@ function showFootnotePopover(link) { const popover = document.createElement('div'); popover.className = 'footnote-popover'; + const _overlay = document.getElementById('reader-overlay'); + ['reader-theme-sepia', 'reader-theme-bright'].forEach(cls => { + if (_overlay?.classList.contains(cls)) popover.classList.add(cls); + }); popover.innerHTML = clone.innerHTML; const closeBtn = document.createElement('button');