delete-security-code

解除北科的驗證碼

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

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.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         delete-security-code
// @namespace    http://tampermonkey.net/
// @version      1.1.2
// @description  解除北科的驗證碼
// @author       onon1101
// @license      MIT
// @match        https://nportal.ntut.edu.tw/index.do*
// @match        https://nportal.ntut.edu.tw/login.do
// @icon         https://www.google.com/s2/favicons?sz=64&domain=edu.tw
// @grant        none
// @require      https://cdnjs.cloudflare.com/ajax/libs/qs/6.11.2/qs.min.js
// @require      http://ajax.googleapis.com/ajax/libs/dojo/1.17.3/dojo/dojo.js
// ==/UserScript==

(function () {
    'use strict';
    console.log('start');
})();

if (location.href === 'https://nportal.ntut.edu.tw/login.do') {
    document.getElementsByTagName("font")[0].remove;
    const errorMsg = document.getElementsByTagName("center")[0].innerText.split('\n')[7];
    if (errorMsg === '「驗證碼」輸入錯誤,請重新輸入。') {
        document.getElementsByTagName("body")[0].remove();
        // document.getElementsByClassName("vsc-initialized")[0].remove();
        location.reload();
    }
    return ;
}

window.login1 = function login1() {
    document.getElementById('mpassword').type = 'password';
    document.getElementById('eyes').src = 'images/pwdhide.png';
    var thisform = document.login;
    var encodePwd = "{ENCODE}" + dojox.encoding.crypto.Blowfish.encrypt(thisform.mpassword.value, thisform.muid.value.toLowerCase());
    thisform.mpassword.value = encodePwd;
    thisform.submit();
}

document.getElementById("authcode").remove();
document.getElementsByClassName("authcode co")[0].remove();
document.getElementsByClassName("title")[2].remove();

 let styleElement = document.createElement("style");
        styleElement.type = "text/css";
        styleElement.innerText = ".notifyjs-bootstrap-base {width: 200px;float: left;margin: 10px 0 0 10px;text-align: left;font-size: 16px;}";
        document.getElementById("wrap").appendChild(styleElement);