diff --git a/scripts/Actions/Explore.ts b/scripts/Actions/Explore.ts index dfa759c4..7278876f 100644 --- a/scripts/Actions/Explore.ts +++ b/scripts/Actions/Explore.ts @@ -28,14 +28,14 @@ export function filterAnime(arn: AnimeNotifier, input: HTMLInputElement) { // Hides anime that are already in your list. And "toggles" localStorage.hide if button is pressed export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLButtonElement) { if(input) { - if(localStorage.getItem("hideAdded") === "true") { - localStorage.setItem("hideAdded", "false") + if(localStorage.getItem("hide-added-anime") === "true") { + localStorage.setItem("hide-added-anime", "false") } else { - localStorage.setItem("hideAdded", "true") + localStorage.setItem("hide-added-anime", "true") } } - if(localStorage.getItem("hideAdded") === "true" || input.type === "submit") { + if(input || localStorage.getItem("hide-added-anime") === "true") { for(let anime of findAll("anime-grid-cell")) { if(anime.dataset.added === "true") { anime.classList.toggle("anime-grid-cell-hide") diff --git a/scripts/AnimeNotifier.ts b/scripts/AnimeNotifier.ts index e8286c93..4b3563ef 100644 --- a/scripts/AnimeNotifier.ts +++ b/scripts/AnimeNotifier.ts @@ -480,7 +480,7 @@ export default class AnimeNotifier { return } - if(localStorage.getItem("hideAdded") === "true") { + if(localStorage.getItem("hide-added-anime") === "true") { actions.hideAddedAnime() } }