File tree Expand file tree Collapse file tree
nodejs-assets/nodejs-project Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 }
2323 header {
2424 font-size : 28px ;
25- margin-top : 30px ;
2625 margin-bottom : 20px ;
2726 }
2827
28+ # lastUpdatedAt {
29+ margin-top : 30px ;
30+ opacity : 0.6 ;
31+ }
2932 .content {
3033 max-width : 1000px ;
3134 margin-left : 10px ;
3639 # batteryPercent {
3740 font-size : 40px ;
3841 font-variant-numeric : tabular-nums;
42+ font-weight : bold;
3943 }
4044 .battery-container {
4145 display : flex;
200204 </ head >
201205 < body >
202206 < div class ="content ">
207+ < div id ="lastUpdatedAt "> </ div >
203208 < header id ="header "> Fetching Battery...</ header >
204209
205210 < div >
577582 const oldNum = parseFloat (
578583 existingEl . getAttribute ( 'data-value' ) ,
579584 ) ;
580- console . log ( newNum , oldNum ) ;
581585 if ( oldNum !== newNum ) {
582586 setTimeout ( ( ) => {
583587 let existingEl = document . getElementById ( el . id ) ;
718722 return ;
719723 }
720724
725+ document . getElementById ( 'lastUpdatedAt' ) . innerText =
726+ 'Last Updated At: ' +
727+ Intl . DateTimeFormat ( 'en-US' , {
728+ hour : 'numeric' ,
729+ minute : 'numeric' ,
730+ second : 'numeric' ,
731+ hour12 : false ,
732+ } ) . format ( new Date ( ) ) ;
733+
721734 const indicesOfHigh = getIndicesOfLargestNumbers ( info . cellVolts ) ;
722735 const indicesOfLow = getIndicesOfSmallestNumbers ( info . cellVolts ) ;
723736 let highVoltageIndex =
You can’t perform that action at this time.
0 commit comments