From c765396e9068e0cd27bef2645406bcb92ff8574c Mon Sep 17 00:00:00 2001 From: Mu-An Chiou Date: Tue, 22 Mar 2022 09:04:59 +0800 Subject: [PATCH] Check closest parent because their ajax response doesnt match --- dashboard.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dashboard.js b/dashboard.js index a79b527..dd2de4c 100644 --- a/dashboard.js +++ b/dashboard.js @@ -189,7 +189,8 @@ async function fetchFollowees() { async function addMoreSpecificIdentifiers(list) { const followees = await getFolloweeList() for (const record of list) { - if (!record.target.classList.contains('news') && record.target.id !== 'panel-1') continue + const closestParent = record.target.closest('.news, #panel-1') + if (!closestParent) continue for (const eventItem of record.target.querySelectorAll(eventClasses)) { if (!(eventItem instanceof HTMLElement)) continue