File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,6 +227,7 @@ <h1>Ship with every Algerian courier through <em>one</em> API</h1>
227227 < a class ="btn " href ="https://github.com/DZBuild-com/dzship " rel ="noopener "> Courier guides →</ a >
228228 </ div >
229229 < div class ="hero-meta ">
230+ < span id ="reqStat " hidden > < b id ="reqStatN "> 0</ b > requests served</ span >
230231 < span > < b > POST</ b > /v1/orders</ span >
231232 < span > < b > POST</ b > /v1/track</ span >
232233 < span > < b > POST</ b > /v1/rates</ span >
@@ -529,5 +530,17 @@ <h2 style="margin-top:8px">dzship is the shipping. DZBuild is the rest.</h2>
529530 }
530531} ) ( ) ;
531532</ script >
533+ < script >
534+ ( function ( ) {
535+ var el = document . getElementById ( 'reqStat' ) , n = document . getElementById ( 'reqStatN' ) ;
536+ if ( ! el || ! n || ! window . fetch ) return ;
537+ fetch ( '/stats' ) . then ( function ( r ) { return r . json ( ) ; } ) . then ( function ( d ) {
538+ if ( d && typeof d . totalRequests === 'number' && d . totalRequests > 0 ) {
539+ n . textContent = d . totalRequests . toLocaleString ( 'en-US' ) ;
540+ el . hidden = false ;
541+ }
542+ } ) . catch ( function ( ) { } ) ;
543+ } ) ( ) ;
544+ </ script >
532545</ body >
533546</ html >
You can’t perform that action at this time.
0 commit comments