File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -881,6 +881,10 @@ <h4>Discord Timestamps</h4>
881881 const data = await response . json ( ) ;
882882 mutatorData = {
883883 startTime : new Date ( data . t ) ,
884+ current : {
885+ level : LEVELS [ data . c [ 0 ] ] ,
886+ mutator : MUTATORS [ data . c [ 1 ] ]
887+ } ,
884888 past : data . p . map ( ( [ l , m ] ) => ( { level : LEVELS [ l ] , mutator : MUTATORS [ m ] } ) ) ,
885889 future : data . f . map ( ( [ l , m ] ) => ( { level : LEVELS [ l ] , mutator : MUTATORS [ m ] } ) )
886890 } ;
@@ -975,12 +979,9 @@ <h4>Discord Timestamps</h4>
975979}
976980
977981async function updateActiveMutator ( ) {
978- if ( ! mutatorData ) return ;
979-
980- const current = getMutatorAtOffset ( 0 ) ;
981- if ( ! current ) return ;
982+ if ( ! mutatorData || ! mutatorData . current ) return ;
982983
983- const { level, mutator } = current ;
984+ const { level, mutator } = mutatorData . current ;
984985 const localTime = new Date ( mutatorData . startTime ) ;
985986 const displayHour = localTime . getHours ( ) ;
986987
@@ -1385,4 +1386,4 @@ <h4>Discord Timestamps</h4>
13851386init ( ) ;
13861387</ script >
13871388</ body >
1388- </ html >
1389+ </ html >
You can’t perform that action at this time.
0 commit comments