Skip to content

Instantly share code, notes, and snippets.

@aleister1102
Last active June 19, 2023 05:27
Show Gist options
  • Save aleister1102/64964f9f284f839e903e1c8b73093e8c to your computer and use it in GitHub Desktop.
Save aleister1102/64964f9f284f839e903e1c8b73093e8c to your computer and use it in GitHub Desktop.
Script đánh giá môn học
(function rating() {
const value = 5; // Chỉnh giá trị muốn đánh giá ở đây
for (let i = 0; i < 9; i++) {
const rows = document.querySelectorAll("tr");
rows.forEach((row) => {
const radioButton = row.querySelector(`input[type='radio']:nth-of-type(${value})`);
if(radioButton)
radioButton.checked = true;
})
const nextButton = document.querySelector("input[value='Tiếp']")
nextButton.click();
}
const finishButton = document.querySelector("input[value='Hoàn tất']");
finishButton.click();
const listButton = document.querySelector("input[value='Danh sách']");
listButton.click();
window.location.reload()
})()
@aleister1102
Copy link
Author

aleister1102 commented Jun 12, 2023

Các bước thực hiện 🗒️:

  1. Chọn môn học cần đánh giá.
  2. Chọn giảng viên cần đánh giá.
  3. Chỉnh giá trị cần đánh giá ở giá trị value. Ví dụ nếu muốn đánh giá 1 điểm hết thì chọn giá trị là 1.
  4. Sau khi chỉnh thì copy script này vào console của trang web để sử dụng.

Tip 💡: có thể nhấn phím mũi tên lên để chạy lại script đã chạy mà không cần copy/paste

@phucthuan1st
Copy link

có thể phải reload trang giữa các môn á. Test trên Firefox, lỗi biến đã tồn tại nè :>

@aleister1102
Copy link
Author

có thể phải reload trang giữa các môn á. Test trên Firefox, lỗi biến đã tồn tại nè :>

Tks bro 💯 , đã thêm dòng reload sau khi đánh giá :>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment