aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/utilities/refreshAnimation.ts
blob: ba5011075f689d5ede459bfbf9c64adf5185ad58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
        });
      }
    }
  });
}