Moodle AutoBRS

Автоматически отмечает посещаемость в БРС.

安装此脚本
作者推荐脚本

您可能也喜欢Moodle AutoPilot

安装此脚本
  1. // ==UserScript==
  2. // @name Moodle AutoBRS
  3. // @namespace https://t.me/johannmosin
  4. // @version 0.1
  5. // @description Автоматически отмечает посещаемость в БРС.
  6. // @author Johann Mosin
  7. // @match https://www.cs.vsu.ru/brs/att_marks_report_student/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. function checkAndClickButton() {
  16. const button = document.getElementById('modalCurrentLessonForMarkButtonOK');
  17. if (button) {
  18. button.click();
  19. clearInterval(intervalId);
  20. }
  21. }
  22.  
  23. const intervalId = setInterval(checkAndClickButton, 1000);
  24.  
  25. setTimeout(() => {
  26. if (!document.getElementById('modalCurrentLessonForMarkButtonOK')) {
  27. location.reload();
  28. }
  29. }, 10000);
  30. })();