Delay DOM mutation
This commit is contained in:
parent
3776b87d7e
commit
07a8bb0ffa
@ -933,8 +933,11 @@ export default class AnimeNotifier {
|
|||||||
let minutes = Math.trunc(time / 60)
|
let minutes = Math.trunc(time / 60)
|
||||||
let seconds = Math.trunc(time) % 60
|
let seconds = Math.trunc(time) % 60
|
||||||
let paddedSeconds = ("00" + seconds).slice(-2)
|
let paddedSeconds = ("00" + seconds).slice(-2)
|
||||||
timeElement.textContent = `${minutes}:${paddedSeconds}`
|
|
||||||
progressElement.style.transform = `scaleX(${time / video.duration})`
|
Diff.mutations.queue(() => {
|
||||||
|
timeElement.textContent = `${minutes}:${paddedSeconds}`
|
||||||
|
progressElement.style.transform = `scaleX(${time / video.duration})`
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
video.addEventListener("waiting", () => {
|
video.addEventListener("waiting", () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user