Browse Source

lazygit

main
Gregory Leeman 1 month ago
parent
commit
731258f548
  1. 8
      workflowy-helper/main.js

8
workflowy-helper/main.js

@ -155,8 +155,8 @@
const breadcrumbs = breadcrumb.querySelectorAll('a'); const breadcrumbs = breadcrumb.querySelectorAll('a');
breadcrumbs.forEach(bc => { breadcrumbs.forEach(bc => {
var text = bc.innerText.trim(); var text = bc.innerText.trim();
if (hotspots.some(hotspot => text.includes(hotspot))) { if (hotspots.includes(text)) {
const hotspot = hotspots.find(hotspot => text.includes(hotspot)); const hotspot = text;
projectNode.classList.add(`hotspot-${hotspot}`); projectNode.classList.add(`hotspot-${hotspot}`);
} }
}); });
@ -166,8 +166,8 @@
if (ns.length > 0) { if (ns.length > 0) {
const n = ns[0]; const n = ns[0];
const text = safeGetContent(n, ".content > .innerContentContainer"); const text = safeGetContent(n, ".content > .innerContentContainer");
if (hotspots.some(hotspot => text.includes(hotspot))) { if (hotspots.includes(text)) {
const hotspot = hotspots.find(hotspot => text.includes(hotspot)); const hotspot = text;
projectNode.classList.add(`hotspot-${hotspot}`); projectNode.classList.add(`hotspot-${hotspot}`);
const children = projectNode.querySelectorAll('.project'); const children = projectNode.querySelectorAll('.project');
children.forEach(child => { children.forEach(child => {

Loading…
Cancel
Save