Created
September 3, 2022 14:32
-
-
Save zakuroishikuro/6b2c98b82c78aafb9ffc7c5b4939045c to your computer and use it in GitHub Desktop.
https://node.green/ でv18とv12の差分だけ表示するブックマークレット
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:{ | |
const [v12,v18] = [".v12", ".v18"].map(v=>document.querySelector(v).cellIndex); | |
const style = document.createElement("style"); | |
style.textContent = ` | |
th, td {display: none} | |
td:nth-child(1), | |
th:nth-child(${v12 + 1}), th:nth-child(${v18 + 1}), | |
td:nth-child(${v12 + 1}), td:nth-child(${v18 + 1}) | |
{ | |
display: table-cell; | |
} | |
`; | |
document.head.appendChild(style); | |
for (const table of document.body.querySelectorAll("table.results")) { | |
for (const row of table.rows) { | |
const [v12r,v18r] = [v12, v18].map(v=>row.cells[v]?.textContent); | |
if (v12r && v18r && v12r == v18r) | |
row.style.display = "none"; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment