Skip to content

Instantly share code, notes, and snippets.

@refeed
Last active January 18, 2024 14:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refeed/92ed85db5d9e7ab258a9e23f4f4de92e to your computer and use it in GitHub Desktop.
Save refeed/92ed85db5d9e7ab258a9e23f4f4de92e to your computer and use it in GitHub Desktop.
hitung jam bantu simaster
// 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