Podcast: built-in screen for Podgrab (shows, episodes, playback, search)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7f38ac5366
commit
675df5710b
13 files changed
+177
-19
No files matched your search
@@ -19,18 +19,6 @@ function showFrame(key, url, title, allow) {
|
||||
wrap.className = 'on'; document.body.classList.add('onaudio');
|
||||
}
|
||||
|
||||
// Podcast: opens in a frame when it has a secure (https) address; a plain-http address cannot be framed by a secure page.
|
||||
// Podcast: a plain-http address on the home network. A secure page cannot frame http content, and the address is
|
||||
// private to the LAN, so this opens it directly in the browser (which works on the home network or over a VPN).
|
||||
function viewPodcast() {
|
||||
const url = cfg.podcast, u = new URL(url), canFrame = u.protocol === 'https:';
|
||||
$('#view').innerHTML = `<div class="wrap"><h1>Podcast</h1><p class="sub">${esc(u.host)}</p>
|
||||
<div class="bar" style="margin-bottom:0"><a class="btn" href="${esc(url)}" target="_blank" rel="noopener">Open in new tab</a></div>
|
||||
${canFrame ? '<p class="sub" style="margin:8px 0 0">If the page below stays blank, the app does not allow being shown inside another app. Use Open in new tab.</p>'
|
||||
: '<div class="card" style="max-width:none;margin-top:12px"><p style="margin:0">This is a plain <b>http</b> address, which a secure page cannot show inside itself. It opens in its own tab, and works at home or on your VPN.</p></div>'}</div>`;
|
||||
if (canFrame) showFrame('podcast', url, 'Podcast', 'autoplay; fullscreen; picture-in-picture; clipboard-write');
|
||||
}
|
||||
|
||||
// The frame is created once and kept alive, so playback carries on while you use other tabs.
|
||||
// It loads /api/audiobooks/enter, where the server adds the site's secret sign-in link itself (the key never reaches this page).
|
||||
const ENTER = '/api/audiobooks/enter';
|
||||
|
||||
Reference in new issue
Block a user