diff --git a/constants.json b/constants.json index 98e3b4f..c402fc1 100644 --- a/constants.json +++ b/constants.json @@ -255,19 +255,19 @@ "color": "rgb(225, 225, 225)" }, "Teto Tuesday": { - "color": "rgb(255, 100, 100)", + "color": "#d5738d", "caseInsensitive": true }, "Teto Territory": { - "color": "rgb(255, 100, 100)", + "color": "#d5738d", "caseInsensitive": true }, "Teto": { - "color": "rgb(255, 100, 100)", + "color": "#d5738d", "caseInsensitive": true }, "Kasane": { - "color": "rgb(255, 100, 100)", + "color": "#d5738d", "caseInsensitive": true }, "Ryouiki Tenkai": { diff --git a/pageUpdater.js b/pageUpdater.js index d0b2505..5207af1 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -119,10 +119,23 @@ function highlighter(json, full = true) { spanEnd = element.content.length } + var spanStart = element.content.substring(0, termIndex).lastIndexOf(" ") + 1 + + // if (highTable[index] == "ULTRAKILL") { + // console.log(startContent, " ---- ", endContent) + // } + + var startContent = element.content.substring(spanStart - 1, termIndex) var endContent = element.content.substring(termIndex + termKey.length, spanEnd) - var spanStart = element.content.substring(0, termIndex).lastIndexOf(" ") + 1 - var startContent = element.content.substring(spanStart - 1, termIndex) + if (startContent.includes("(") && !endContent.includes(")")) { + spanEnd = element.content.indexOf(")", spanStart) + 1 + endContent = element.content.substring(termIndex + termKey.length, spanEnd) + } + else if (endContent.includes(")") && !startContent.includes("(")) { + spanStart = element.content.substring(0, spanStart).lastIndexOf("(") + startContent = element.content.substring(spanStart - 1, termIndex) + } var style = termProps.style || "" var classes = termProps.classes || ""