@@ -10,3 +10,38 @@ document.addEventListener('click', function(e) {
1010 }
1111} ) ;
1212
13+
14+ function copyUrl ( url ) {
15+ navigator . clipboard . writeText ( url ) . then ( ( ) => {
16+ const btn = event . target ;
17+ btn . textContent = '✅' ;
18+ setTimeout ( ( ) => btn . textContent = 'CC' , 800 ) ;
19+ } ) ;
20+ }
21+ function copyAssets ( ) {
22+ const urls = Array . from ( document . querySelectorAll ( '#stack-assets a' ) ) . map ( a => a . href ) . join ( '\n' ) ;
23+ navigator . clipboard . writeText ( urls ) . then ( ( ) => {
24+ const btn = event . target ;
25+ btn . textContent = '✅ Copied!' ;
26+ setTimeout ( ( ) => btn . textContent = 'CC Copy URLs' , 1200 ) ;
27+ } ) ;
28+ }
29+ document . getElementById ( 'copyAllTools' ) . addEventListener ( 'click' , ( ) => {
30+ const urls = [
31+ 'https://git-scm.com/' ,
32+ 'https://nixos.org/' ,
33+ 'https://docker.com/' ,
34+ 'https://developer.hashicorp.com/terraform/' ,
35+ 'https://kubernetes.io/' ,
36+ 'https://argo-cd.readthedocs.io/en/stable/' ,
37+ 'https://dspy.ai/' ,
38+ 'https://www.openpolicyagent.org/'
39+ ] . join ( '\n' ) ;
40+ navigator . clipboard . writeText ( urls ) . then ( ( ) => {
41+ const btn = document . getElementById ( 'copyAllTools' ) ;
42+ btn . textContent = '✅ Copied!' ;
43+ setTimeout ( ( ) => btn . textContent = 'CC All' , 1200 ) ;
44+ } ) ;
45+ } ) ;
46+
47+ hljs . highlightAll ( ) ;
0 commit comments