Copy CSS
Build and Deploy / build-and-deploy (push) Successful in 1m25s

This commit is contained in:
2026-07-08 22:00:58 -04:00
parent 3ae28b1f20
commit af8f705579
4 changed files with 12 additions and 9 deletions
+10 -6
View File
@@ -64,9 +64,8 @@
<div class="rss-row">
<span class="rss-label">RSS Feed</span>
<code id="rss-url" onclick="copyRSS()"></code>
<span id="rss-url-src" hidden>{{.RSSURL}}</span>
<span class="rss-copied" id="rss-copied" hidden>Copied!</span>
<button class="nb-button blue rss-url-btn" id="rss-url" onclick="copyRSS()"></button>
</div>
<script>
@@ -97,12 +96,17 @@
})();
const rssURL = document.getElementById('rss-url-src').textContent;
document.getElementById('rss-url').textContent = rssURL;
const rssBtn = document.getElementById('rss-url');
rssBtn.textContent = rssURL;
function copyRSS() {
navigator.clipboard.writeText(rssURL).then(() => {
const el = document.getElementById('rss-copied');
el.hidden = false;
setTimeout(() => el.hidden = true, 1500);
const originalText = rssBtn.textContent;
rssBtn.textContent = 'Copied!';
rssBtn.disabled = true;
setTimeout(() => {
rssBtn.textContent = originalText;
rssBtn.disabled = false;
}, 1500);
});
}
</script>