Last active
January 18, 2024 14:13
-
-
Save refeed/92ed85db5d9e7ab258a9e23f4f4de92e to your computer and use it in GitHub Desktop.
hitung jam bantu simaster
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
// Guide: | |
// 1. Pergi ke simaster > kkn > rpp | |
// 2. Buka salah satu rpp proker sehingga terlihat proker bantu | |
// 3. Tekan F12 untuk memunculkan console, lalu paste script di bawah ini | |
// - Jika script tidak berjalan, bisa ketik: `allow pasting` terlebih dahulu (terkhusus untuk chrome) | |
(function payingkeyen() { | |
// change this when the ui is updated | |
const TABLE_JAM_BANTU = $("#subcontent-element > div:nth-child(8) > div.panel-body > div > table"); | |
let total = 0; | |
const rows = TABLE_JAM_BANTU[0].rows | |
Array.from(rows).forEach((row, index) => { | |
if (!row.innerText.includes("Sudah Presensi")) | |
return; | |
const jam = row.innerText.split("\n")[0].split("["); | |
const jamStr = (jam[jam.length - 1].split(" ")[0]); | |
total += parseFloat(jamStr); | |
}); | |
console.log(`Total jam bantu: ${total} jam`); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment