From 5610d756c2db504cacbda7aabcc34a528faefb47 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 15 Aug 2020 22:27:47 -0700 Subject: [PATCH] Fix video_cards variable name being used twice, breaking filter. --- frontends/ycdl_flask/templates/channel.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frontends/ycdl_flask/templates/channel.html b/frontends/ycdl_flask/templates/channel.html index 13df361..244b59c 100644 --- a/frontends/ycdl_flask/templates/channel.html +++ b/frontends/ycdl_flask/templates/channel.html @@ -341,12 +341,13 @@ function filter_video_cards(search_term) Apply the search filter textbox by hiding the mismatched cards. */ var count = 0; - video_cards = document.getElementById("video_cards").getElementsByClassName("video_card"); + video_cards = document.getElementById("video_cards"); + cards = video_cards.getElementsByClassName("video_card"); search_term = search_term.toLocaleLowerCase(); var download_filter_class = "video_card_" + DOWNLOAD_FILTER; - for (var index = 0; index < video_cards.length; index += 1) + for (var index = 0; index < cards.length; index += 1) { - var video_card = video_cards[index]; + var video_card = cards[index]; var title = video_card.getElementsByClassName("video_title")[0].innerText.toLocaleLowerCase(); if (DOWNLOAD_FILTER && !video_card.classList.contains(download_filter_class)) {