The directory renders its own pages from the store: the most subscribed, categories, A to Z, search, and a page per feed with its address and a Copy button. No token, nothing that writes; /v1 keeps its token check. The publisher's HTML is shown as text, item links only when http(s), with a strict Content-Security-Policy; covers load from their publishers with no referrer. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
11 lines
459 B
JavaScript
11 lines
459 B
JavaScript
// The one thing the directory's pages script (#215): Copy puts a feed's address on the clipboard.
|
|
// Without it, the address is in a field of its own to select by hand.
|
|
document.addEventListener('click', ev => {
|
|
const b = ev.target.closest('[data-copy]');
|
|
if (!b || !navigator.clipboard) return;
|
|
navigator.clipboard.writeText(b.dataset.copy).then(() => {
|
|
b.textContent = 'Copied';
|
|
setTimeout(() => { b.textContent = 'Copy'; }, 1500);
|
|
});
|
|
});
|