From 731258f548159a5e1538966032f97c1113fd1d47 Mon Sep 17 00:00:00 2001 From: Gregory Leeman Date: Sun, 6 Apr 2025 17:45:21 +0100 Subject: [PATCH] lazygit --- workflowy-helper/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workflowy-helper/main.js b/workflowy-helper/main.js index b2e3b7e..b1c425d 100644 --- a/workflowy-helper/main.js +++ b/workflowy-helper/main.js @@ -155,8 +155,8 @@ const breadcrumbs = breadcrumb.querySelectorAll('a'); breadcrumbs.forEach(bc => { var text = bc.innerText.trim(); - if (hotspots.some(hotspot => text.includes(hotspot))) { - const hotspot = hotspots.find(hotspot => text.includes(hotspot)); + if (hotspots.includes(text)) { + const hotspot = text; projectNode.classList.add(`hotspot-${hotspot}`); } }); @@ -166,8 +166,8 @@ if (ns.length > 0) { const n = ns[0]; const text = safeGetContent(n, ".content > .innerContentContainer"); - if (hotspots.some(hotspot => text.includes(hotspot))) { - const hotspot = hotspots.find(hotspot => text.includes(hotspot)); + if (hotspots.includes(text)) { + const hotspot = text; projectNode.classList.add(`hotspot-${hotspot}`); const children = projectNode.querySelectorAll('.project'); children.forEach(child => {