7777 opacity : 0.9 ;
7878 color : # c0c0c0 ;
7979 }
80+
81+ .token-mint-section {
82+ margin : 20px 0 ;
83+ padding : 20px ;
84+ background : # 333333 ;
85+ border : 1px solid # 555555 ;
86+ border-radius : 8px ;
87+ }
88+
89+ .token-mint-header {
90+ font-size : 1.2rem ;
91+ color : # e0e0e0 ;
92+ margin-bottom : 15px ;
93+ font-weight : bold;
94+ }
95+
96+ .token-mint-container {
97+ display : flex;
98+ align-items : center;
99+ gap : 10px ;
100+ flex-wrap : wrap;
101+ }
102+
103+ .token-mint-input {
104+ flex : 1 ;
105+ min-width : 300px ;
106+ padding : 12px ;
107+ background : # 1a1a1a ;
108+ border : 1px solid # 555555 ;
109+ color : # e0e0e0 ;
110+ font-family : monospace;
111+ font-size : 0.9rem ;
112+ border-radius : 4px ;
113+ }
114+
115+ .copy-button {
116+ padding : 12px 16px ;
117+ background : # 808080 ;
118+ color : # 1a1a1a ;
119+ border : none;
120+ border-radius : 4px ;
121+ cursor : pointer;
122+ font-family : monospace;
123+ font-weight : bold;
124+ transition : all 0.3s ease;
125+ }
126+
127+ .copy-button : hover {
128+ background : # 999999 ;
129+ transform : translateY (-1px );
130+ }
131+
132+ .copy-button : active {
133+ transform : translateY (0 );
134+ }
135+
136+ .copy-feedback {
137+ color : # 90EE90 ;
138+ font-size : 0.9rem ;
139+ margin-left : 10px ;
140+ opacity : 0 ;
141+ transition : opacity 0.3s ease;
142+ }
143+
144+ .copy-feedback .show {
145+ opacity : 1 ;
146+ }
80147
81148 .nav-buttons {
82149 display : flex;
359426 < div class ="container ">
360427 < div class ="logo "> OSVM CLI 📚</ div >
361428 < div class ="tagline " id ="page-title "> Documentation</ div >
429+
430+ < div class ="token-mint-section ">
431+ < div class ="token-mint-header "> 🪙 OSVM Token Mint Address</ div >
432+ < div class ="token-mint-container ">
433+ < input type ="text " id ="tokenMint " class ="token-mint-input " value ="pvv4fu1RvQBkKXozyH5A843sp1mt6gTy9rPoZrBBAGS " readonly >
434+ < button class ="copy-button " onclick ="copyTokenMint() "> 📋 Copy</ button >
435+ < span id ="copyFeedback " class ="copy-feedback "> Copied!</ span >
436+ </ div >
437+ </ div >
438+
362439 < div class ="nav-buttons ">
363440 < a href ="index.html " class ="btn btn-primary "> 🏠 Home</ a >
364441 < a href ="docs.html?doc=README " class ="btn btn-secondary "> 📖 Docs Index</ a >
@@ -553,6 +630,39 @@ <h2>Document Not Found</h2>
553630 const docName = getDocumentName ( ) ;
554631 loadDocument ( docName ) ;
555632 } ) ;
633+
634+ // Copy token mint function
635+ function copyTokenMint ( ) {
636+ const tokenInput = document . getElementById ( 'tokenMint' ) ;
637+ const feedback = document . getElementById ( 'copyFeedback' ) ;
638+
639+ // Select and copy the text
640+ tokenInput . select ( ) ;
641+ tokenInput . setSelectionRange ( 0 , 99999 ) ; // For mobile devices
642+
643+ try {
644+ document . execCommand ( 'copy' ) ;
645+
646+ // Show feedback
647+ feedback . classList . add ( 'show' ) ;
648+ setTimeout ( ( ) => {
649+ feedback . classList . remove ( 'show' ) ;
650+ } , 2000 ) ;
651+ } catch ( err ) {
652+ // Fallback for modern browsers
653+ navigator . clipboard . writeText ( tokenInput . value ) . then ( ( ) => {
654+ feedback . classList . add ( 'show' ) ;
655+ setTimeout ( ( ) => {
656+ feedback . classList . remove ( 'show' ) ;
657+ } , 2000 ) ;
658+ } ) . catch ( ( ) => {
659+ console . error ( 'Failed to copy token mint address' ) ;
660+ } ) ;
661+ }
662+
663+ // Deselect the input
664+ tokenInput . blur ( ) ;
665+ }
556666 </ script >
557667</ body >
558668</ html >
0 commit comments