Better names
This commit is contained in:
parent
d1ac2f1d9b
commit
b264d7b28c
@ -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")
|
||||
|
@ -480,7 +480,7 @@ export default class AnimeNotifier {
|
||||
return
|
||||
}
|
||||
|
||||
if(localStorage.getItem("hideAdded") === "true") {
|
||||
if(localStorage.getItem("hide-added-anime") === "true") {
|
||||
actions.hideAddedAnime()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user