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 // Hides anime that are already in your list. And "toggles" localStorage.hide if button is pressed
export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLButtonElement) { export function hideAddedAnime(arn?: AnimeNotifier, input?: HTMLButtonElement) {
if(input) { if(input) {
if(localStorage.getItem("hideAdded") === "true") { if(localStorage.getItem("hide-added-anime") === "true") {
localStorage.setItem("hideAdded", "false") localStorage.setItem("hide-added-anime", "false")
} else { } 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")) { for(let anime of findAll("anime-grid-cell")) {
if(anime.dataset.added === "true") { if(anime.dataset.added === "true") {
anime.classList.toggle("anime-grid-cell-hide") anime.classList.toggle("anime-grid-cell-hide")

View File

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