Sorryops

Skip the half of the fun!

当前为 2023-11-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Sorryops
  3. // @namespace sorryops
  4. // @version 20231129.2
  5. // @description Skip the half of the fun!
  6. // @icon https://orioks.miet.ru/favicon.ico
  7. // @author electromagneticcyclone & angelbeautifull
  8. // @license Unlicense
  9. // @supportURL https://git.disroot.org/electromagneticcyclone/sorryops
  10. // @match https://orioks.miet.ru/student/student/test*
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // @run-at document-start
  14. // ==/UserScript==
  15.  
  16. var success = false;
  17. var intervalId = window.setInterval(actionFunction, 1000);
  18.  
  19. function actionFunction() {
  20. if (!success) {
  21. var boxes = document.getElementsByTagName('input');
  22. for (var i = 0; i < boxes.length; i++) {
  23. if (boxes[i].type === 'checkbox' | boxes[i].type === 'radio') {
  24. var span = document.createElement('span');
  25. span.innerHTML =
  26. boxes[i].type === 'radio' && boxes[i].value == "1"
  27. ? "<b>" + boxes[i].value + "</b>"
  28. : boxes[i].value;
  29. boxes[i].parentNode.insertBefore(span, boxes[i].parentNode.children[0]);
  30. success = true;
  31. }
  32. }
  33. }
  34. }