CCU Helper

快速幫你填線上教學意見調查

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         CCU Helper
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  快速幫你填線上教學意見調查
// @author       Pionxzh
// @match        https://miswww1.ccu.edu.tw/evaluation/Questionnaire/*.php
// @grant        GM_addStyle
// ==/UserScript==

function evaluationSelect() {
    $('.choose input[type="radio"]:first-child').prop("checked", true)
    $('.choose>div>input[type="checkbox"]').prop("checked", true)
    $('.choose>div:last-child>input[type="checkbox"]').prop("checked", false)
}

(function() {
    'use strict';
    if ($ === undefined) return alert('腳本執行錯誤,錯誤代碼: #NOJQ')

    // adding style for button
    GM_addStyle(`
        .p-btn {
            background-color: #F44336;
            color: #FFF;
            height: 30px;
            line-height: 30px;
            width: 90px;
            text-align: center;
            border-radius: 5px;
            cursor: pointer;
            transition: .3s;
            box-shadow: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
        }

        .p-btn:hover {
            background-color: #f12f21;
        }
    `)
    $('#description').after('<div id="evSelect" class="col_12 column p-btn">幫我點嘛</div>')
    $('#evSelect').on('click', ()=> evaluationSelect())

})();