diff options
Diffstat (limited to 'FrontEnd/src/utilities')
-rw-r--r-- | FrontEnd/src/utilities/refreshAnimation.ts | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/FrontEnd/src/utilities/refreshAnimation.ts b/FrontEnd/src/utilities/refreshAnimation.ts new file mode 100644 index 00000000..ba501107 --- /dev/null +++ b/FrontEnd/src/utilities/refreshAnimation.ts @@ -0,0 +1,13 @@ +export default function refreshAnimation(): void { + document.body.querySelectorAll("*").forEach((e) => { + if (e instanceof HTMLElement) { + const an = getComputedStyle(e).animationName; + if (an !== "none") { + e.style.animationName = "none"; + setTimeout(() => { + e.style.animationName = an; + }); + } + } + }); +} |