Skip to content

Commit cf20cc1

Browse files
authored
Update md.html
1 parent 25b47f5 commit cf20cc1

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

misc/md.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff 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

977981
async 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>
13851386
init();
13861387
</script>
13871388
</body>
1388-
</html>
1389+
</html>

0 commit comments

Comments
 (0)