Skip to content

Instantly share code, notes, and snippets.

@lezsakdomi
Last active January 22, 2022 22:29
Show Gist options
  • Save lezsakdomi/0f929153d4684058bf3d8637ae4e9208 to your computer and use it in GitHub Desktop.
Save lezsakdomi/0f929153d4684058bf3d8637ae4e9208 to your computer and use it in GitHub Desktop.
Neptun iterálás a kurzusokon
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