diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index f9999ad3..ea3d433e 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -129,7 +129,7 @@ export class AnimeNotifier { } unmountMountables() { - for(let element of findAll("mounted")) { + for(let element of findAll("mountable")) { element.classList.remove("mounted") } } diff --git a/scripts/utils.ts b/scripts/utils.ts index 7d1ab232..b97017d3 100644 --- a/scripts/utils.ts +++ b/scripts/utils.ts @@ -1,7 +1,8 @@ export function* findAll(className: string) { // getElementsByClassName failed for some reason. // TODO: Test getElementsByClassName again. - let elements = document.querySelectorAll("." + className) + // let elements = document.querySelectorAll("." + className) + let elements = document.getElementsByClassName(className) for(let i = 0; i < elements.length; ++i) { yield elements[i] as HTMLElement