Last active
January 22, 2022 22:29
-
-
Save lezsakdomi/0f929153d4684058bf3d8637ae4e9208 to your computer and use it in GitHub Desktop.
Neptun iterálás a kurzusokon
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
async function openAllCurses(f = () => {}) { | |
for (row of document.querySelectorAll("#Addsubject_course1_gridCourses_bodytable > tbody > tr")) { | |
const id = row.id.replace(/tr__/, ''); | |
const num = row.querySelector('span.link').innerText; | |
console.log(`> #${num}`); | |
A3.Update(`commandname=Code;commandsource=select;id=${id};level=1`, 'DoPostBack'); | |
await new Promise(resolve => setTimeout(resolve, 1000)); | |
await f(num, id); | |
DoCloseModalPopup(true); | |
} | |
} | |
openAllCurses(async (num, id) => { | |
document.querySelector("#__tab_Course_data1_ctl01").click(); | |
await new Promise(resolve => setTimeout(resolve, 1000)); | |
console.log(document.querySelector("#Students1_gridStudents_bodytable > tbody").innerText); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment