Partner kit pages at /partners/<slug>; first one for Jamie (@cryptojaime)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-29 09:36:25 -05:00
parent b197d74234
commit b5baaf27e8
3 changed files with 197 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
// partner kit pages (/partners/<slug>): copy buttons + toast (2026-09-29)
(function(){
var toast=document.getElementById('toast'),tm;
function say(t){toast.textContent=t;toast.classList.add('on');clearTimeout(tm);tm=setTimeout(function(){toast.classList.remove('on')},1400)}
function copy(text,btn){
function fallback(){var r=document.createRange();var el=btn.previousElementSibling||btn.parentElement;r.selectNodeContents(el);var s=getSelection();s.removeAllRanges();s.addRange(r);say('Select and copy')}
try{navigator.clipboard.writeText(text).then(function(){say('Copied')},fallback)}catch(e){fallback()}
}
document.querySelectorAll('[data-copy]').forEach(function(b){b.addEventListener('click',function(){copy(b.getAttribute('data-copy'),b)})});
document.querySelectorAll('[data-copy-el]').forEach(function(b){b.addEventListener('click',function(){var el=document.getElementById(b.getAttribute('data-copy-el'));copy(el.textContent,b)})});
})();