From 0477b500d8aa0970d7f5c646562a3e4bd0aa27a1 Mon Sep 17 00:00:00 2001 From: s7tya <53410646+s7tya@users.noreply.github.com> Date: Sun, 10 Sep 2023 03:25:44 +0900 Subject: [PATCH] fix: rename AsgNegColumn to AsgColumn and fix column numbers --- src/methods/colorizeDeadline.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/methods/colorizeDeadline.ts b/src/methods/colorizeDeadline.ts index 4cd1ac557..ed6692e0a 100644 --- a/src/methods/colorizeDeadline.ts +++ b/src/methods/colorizeDeadline.ts @@ -16,13 +16,13 @@ const trans = { }, } -const enum AsgNegColumn { - Status = 6, - Deadline = 2, +const enum AsgColumn { + Status = 7, + Deadline = 9, } -const getAsgAttrs = (row: HTMLElement, column: AsgNegColumn) => - (row.childNodes[row.childNodes.length - column] as HTMLElement).innerText +const getAsgAttrs = (row: HTMLElement, column: AsgColumn) => + (row.childNodes[column] as HTMLElement).innerText const getAsgRowElements = (document: Document) => document.querySelectorAll(".row0, .row1, .row") @@ -56,8 +56,8 @@ const colorizeDeadline = ({ Array.from(getAsgRowElements(document)) .map((row) => ({ row, - deadline: getAsgAttrs(row, AsgNegColumn.Deadline), - status: checkStatus ? getAsgAttrs(row, AsgNegColumn.Status) : undefined, + deadline: getAsgAttrs(row, AsgColumn.Deadline), + status: checkStatus ? getAsgAttrs(row, AsgColumn.Status) : undefined, })) .filter(({ deadline }) => deadline) .map((attrs) => ({