CCU Helper

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

您需要先安装一个扩展,例如 篡改猴Greasemonkey暴力猴,之后才能安装此脚本。

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

您需要先安装一个扩展,例如 篡改猴暴力猴,之后才能安装此脚本。

您需要先安装一个扩展,例如 篡改猴Userscripts ,之后才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。

您需要先安装用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

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

})();