diff --git a/serverside/name-color.ts b/serverside/name-color.ts index 03cbb4a..c101f77 100644 --- a/serverside/name-color.ts +++ b/serverside/name-color.ts @@ -67,8 +67,12 @@ async function get_name_color(name: string): Promise { } for (const p of dom.querySelectorAll("p")) { - const color = parse_color(p.textContent); - if (color) return color; + if (!p.textContent.includes("name-color:")) continue; + + for (const node of p.childNodes) { + const color = parse_color(node.textContent); + if (color) return color; + } } }