Sorryops

Skip the half of the fun!

目前为 2023-11-29 提交的版本。查看 最新版本

// ==UserScript==
// @name         Sorryops
// @namespace    sorryops
// @version      20231129.0
// @description  Skip the half of the fun!
// @icon         https://orioks.miet.ru/favicon.ico
// @author       electromagneticcyclone & angelbeautifull
// @license      Unlicense
// @supportURL   
// @match        https://orioks.miet.ru/student/student/test*
// @grant        GM_getValue
// @grant        GM_setValue
// @run-at       document-start
// ==/UserScript==

var success = false;
var intervalId = window.setInterval(actionFunction, 1000);

function actionFunction() {
    if (!success) {
        var boxes = document.getElementsByTagName('input');
        for (var i = 0; i < boxes.length; i++) {
            if (boxes[i].type === 'checkbox' | boxes[i].type === 'radio') {
                var span = document.createElement('span');
                var value =
                  boxes[i].type === 'radio' && boxes[i].value == "1"
                    ? "<b>" + boxes[i].value + "</b>"
                    : boxes[i].value;
                span.innerHTML = value + "  ";
                boxes[i].parentNode.insertBefore(span, boxes[i].parentNode.children[0]);
                success = true;
            }
        }
    }
}