File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,29 @@ <h2>how to find me</h2>
152152 setInterval ( updatePentestTimer , 1000 ) ;
153153 </ script >
154154
155+ < script >
156+ const DEFAULT_CERT_PROGRESS = 80 ;
157+
158+ function applyCertProgress ( pct ) {
159+ const clean = Math . max ( 0 , Math . min ( 100 , Number ( pct ) || 0 ) ) ;
160+ document . documentElement . style . setProperty ( "--cert-progress" , clean + "%" ) ;
161+ const textEl = document . getElementById ( "cert-progress-text" ) ;
162+ if ( textEl ) textEl . textContent = clean + "%" ;
163+ }
164+
165+ applyCertProgress ( DEFAULT_CERT_PROGRESS ) ;
166+
167+ fetch ( "https://api.github.com/repos/coaglio/coaglio.github.io/m3t4.md" )
168+ . then ( r => r . json ( ) )
169+ . then ( data => {
170+ if ( ! data . content ) return ;
171+ const decoded = atob ( data . content ) ;
172+ const match = decoded . match ( / M 3 T 4 : \s * ( \d { 1 , 3 } ) / i) ;
173+ if ( match ) applyCertProgress ( match [ 1 ] ) ;
174+ } )
175+ . catch ( ( ) => { } ) ;
176+ </ script >
177+
155178</ body >
156179</ html >
157180
You can’t perform that action at this time.
0 commit comments