CCU Helper

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

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==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())

})();