Created
March 2, 2024 14:17
-
-
Save zisra/7b6bd479a1d96e11fd595f5ee4d3c789 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const rows = document.querySelectorAll('#dataGridRight table tbody tr.listCell'); | |
const result = []; | |
rows.forEach(row => { | |
const cells = row.querySelectorAll('td'); | |
const title = cells[0].textContent.trim(); | |
if(!cells[2]) return; | |
const weight = parseInt(cells[2].textContent) / 100; | |
result.push({ title, weight }); | |
}); | |
copy(result); |
This file contains hidden or 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
const table = document.querySelector("#dataGrid > table"); | |
const rows = Array.from(table.querySelectorAll("tr .listRowHeight")) | |
const finalData = rows.map(row=>{ | |
const data = Array.from(row.querySelectorAll("td")).map(item=>item.innerText); | |
let [from, total] = data[8].split("/").map(i=>parseInt(i.trim())); | |
if(!from){ | |
[from, total] = data[9].split("/").map(i=>parseInt(i.trim())); | |
} | |
return { | |
name: data[1], | |
category: data[4], | |
score: from, | |
totalScore: total, | |
} | |
}); | |
copy(finalData); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment