File tree Expand file tree Collapse file tree 5 files changed +16
-10
lines changed
Expand file tree Collapse file tree 5 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 197197 }, 1000 );
198198
199199 let lastCycleTimeInterval = setInterval (() => {
200- if (lastCycleTimeMS !== frameHandler .getLastCycleTime ()) {
201- // console.log("Cycle time is not matching", {
202- // current: lastCycleTimeMS,
203- // new: frameHandler.getLastCycleTime(),
204- // });
205- lastCycleTimeMS = frameHandler .getLastCycleTime () || 0 ;
200+ const newMs = frameHandler .getLastCycleTime ();
201+ if (newMs !== undefined && newMs !== null && lastCycleTimeMS !== newMs ) {
202+ lastCycleTimeMS = newMs ;
206203 lastCycleTime = formatTimeShortNoAgoSeconds (lastCycleTimeMS );
207204 }
208205 }, 1000 );
Original file line number Diff line number Diff line change @@ -11,6 +11,15 @@ interface Version {
1111}
1212
1313export const VERSIONS : { [ key : string ] : Version } = {
14+ "2.7.3.2" : {
15+ changelog : `
16+ <h1 class="text-lg font-bold">v2.7.3.2</h1>
17+ <ul>
18+ <li>Fixed cycle time data from scraping extension</li>
19+ <li>Added "FTA Buddy Native" to extension, add FTA Buddy features to the official field monitor</li>
20+ <li>Fix match log fetching in scraping and notepad only mode</li>
21+ </ul>`
22+ } ,
1423 "2.7.3.1" : {
1524 changelog : `
1625 <h1 class="text-lg font-bold">v2.7.3.1</h1>
Original file line number Diff line number Diff line change @@ -149,9 +149,9 @@ function updateFooter(
149149 }
150150 }
151151
152- // C: last cycle — prefer server string, treat "unk" sentinel as no data
152+ // C: last cycle — convert server "M:SS" string to formatted display
153153 const rawLast = serverCycleData ?. lastCycleTime ;
154- const lastStr = ( rawLast && rawLast !== "unk" ) ? rawLast : "—" ;
154+ const lastStr = ( rawLast && rawLast !== "unk" ) ? formatCycleMs ( cycleTimeToMS ( rawLast ) ) : "—" ;
155155
156156 // A: average — prefer server ms value
157157 const avgMs = serverCycleData ?. averageCycleTime ?? null ;
Original file line number Diff line number Diff line change 55 " extension" ,
66 " userscript"
77 ],
8- "version" : " 2.7.3.1 " ,
8+ "version" : " 2.7.3.2 " ,
99 "description" : " " ,
1010 "scripts" : {
1111 "start" : " bun run ./src/index.ts" ,
Original file line number Diff line number Diff line change @@ -436,7 +436,7 @@ function updateStation(
436436 if ( validBatVals . length > 0 ) {
437437 const sorted = [ ...validBatVals ] . sort ( ( a , b ) => a - b ) ;
438438 const minBat = sorted [ Math . floor ( sorted . length * 0.02 ) ] ?? sorted [ 0 ] ;
439- els . batSub . textContent = `min: ${ minBat . toFixed ( 1 ) } v` ;
439+ els . batSub . textContent = `${ minBat . toFixed ( 1 ) } v` ;
440440 els . batSub . style . color = minBat < 7.8 ? "#dc2626" : "#9e9e9e" ;
441441 } else {
442442 els . batSub . textContent = "" ;
You can’t perform that action at this time.
0 commit comments