arrizalamin / IsiKuisionerSIAMUB

// ==UserScript==
// @name         IsiKuisionerSIAMUB
// @version      1.0
// @description  Isi Kuisioner SIAM UB
// @author       Arrizal Amin
// @match        https://siam.ub.ac.id/kuisioner.php*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const nilai = window.prompt('Nilai (1-5)', '1');

    const radios = document.querySelectorAll(`input[type="radio"][value="${nilai}"]`);
    radios.forEach(radio => {
        radio.setAttribute('checked', true);
    });

    document.getElementById('saran').value = '-';
    document.forms['form_kuis'].submit();
})();