Better names

This commit is contained in:
Jarmo Riikonen 2018-07-05 19:14:20 +03:00
parent d1ac2f1d9b
commit b264d7b28c
2 changed files with 5 additions and 5 deletions

View File

@ -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")

View File

@ -480,7 +480,7 @@ export default class AnimeNotifier {
return
}
if(localStorage.getItem("hideAdded") === "true") {
if(localStorage.getItem("hide-added-anime") === "true") {
actions.hideAddedAnime()
}
}