skip checkcode

skip the checkcode make me happy

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         skip checkcode
// @namespace    http://tampermonkey.net/
// @version      0.101
// @description  skip the checkcode make me happy
// @author       JunYou
// @include      /ecsa.ntcu.edu.tw*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


    var style = document.createElement("style");
style.type = "text/css";
var text = document.createTextNode(
`
body{
    background-image: url("https://i.imgur.com/4KIjP1q.jpg") !important;
    background-size: cover;
    font-family: 'Noto Sans TC', sans-serif !important;
}
.panel{
    justify-content: center !important;
}
.panel .block:first-child{
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 0px 25px rgba(0,0,0,.5) !important;
}
.panel .title{
    background: rgb(125, 165, 200) !important;
}
#login_btn{
    background: rgb(120, 180, 200) !important;
    border: none !important;
    transition: .3s;
}
#login_btn:hover{
    background: rgb(100, 160, 180) !important;
}
#forget_pwd{
    background: #e9e9e9 !important;
    border: none !important;
    transition: .3s;
}
#forget_pwd:hover{
    background: #e2e2e2 !important;
}

@media screen and (max-width: 768px){
    .container-1200{
        width: 100% !important;
    }
    .container-1200 td{
        width: 80% !important;
    }
    .container-1024{
        width: 100% !important;
    }
    .container-1024 .block{
        width: calc(100% - 15px) !important;
    }
}

`);
style.appendChild(text);
var head = document.getElementsByTagName("head")[0];
head.appendChild(style);


//加入思源黑體
var css = document.createElement("link");
css.setAttribute("rel", "stylesheet");
css.setAttribute("type", "text/css");
css.setAttribute("href", "https://fonts.googleapis.com/css?family=Noto+Sans+TC&display=swap");
css.onload = function(){ }
document.getElementsByTagName("head")[0].appendChild(css);


document.getElementById('StartCheck').value = "N";

    var Btns = document.querySelector("#login_btn");
    Btns.removeAttribute ("onclick");
    Btns.setAttribute ("type",'submit');
    document.querySelector('#txtCheckCode').setAttribute('placeholder','小孩子才輸驗證碼')
    document.querySelector('#txtCheckCode').setAttribute('readOnly','true')
    document.querySelector('#ImgCheckCode').remove();
    document.querySelector('.word').remove();
    document.querySelector('.panel .block:last-child').remove();

//跳過驗證
    document.querySelector("#login_btn").onclick= function(){
       document.getElementById('IsLogin').value = 'Y';
       document.getElementById('StartCheck').value = '';
       document.getElementById('ReBuildTheCheckCode').value = '';
       document.myform.action = 'login.aspx';
       document.myform.target = '_self';
       document.myform.submit();
    }

    // Your code here...
})();