show history data
This commit is contained in:
parent
a0483cb07e
commit
d5e32b4829
32
main.js
32
main.js
@ -2295,6 +2295,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showHistoryData(points) {
|
||||||
|
let pointCells = getPointCells()
|
||||||
|
|
||||||
|
for (const [i, pointCell] of pointCells.entries()) {
|
||||||
|
let pointNumber = getPointNumberFromCell(pointCell)
|
||||||
|
if (pointNumber == null) continue
|
||||||
|
|
||||||
|
let point = points[pointNumber]
|
||||||
|
|
||||||
|
if (point.history_needed) {
|
||||||
|
pointCell.append(Tag.span({ classes: "point-info", textContent: "Нужна ИС" }))
|
||||||
|
}
|
||||||
|
|
||||||
|
if (point.history_ru) {
|
||||||
|
pointCell.append(Tag.span({ classes: "point-info", textContent: "Есть ИС" }))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
addStylesToHead(`
|
||||||
|
.point-info {
|
||||||
|
&:first-of-type {
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& + &::before {
|
||||||
|
content: " | "
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`)
|
||||||
|
}
|
||||||
|
|
||||||
function getRouteName() {
|
function getRouteName() {
|
||||||
return document.querySelector(`#content h1`).textContent.match(/(?<=\")[^\"]+/)
|
return document.querySelector(`#content h1`).textContent.match(/(?<=\")[^\"]+/)
|
||||||
}
|
}
|
||||||
@ -2340,6 +2371,7 @@
|
|||||||
let points = await getPointsFromRows()
|
let points = await getPointsFromRows()
|
||||||
countCp(points)
|
countCp(points)
|
||||||
addLinksToCp(points)
|
addLinksToCp(points)
|
||||||
|
showHistoryData(points)
|
||||||
})()
|
})()
|
||||||
sendRouteData()
|
sendRouteData()
|
||||||
showUnknownPoints()
|
showUnknownPoints()
|
||||||
|
Loading…
Reference in New Issue
Block a user