SZU Auto

【使用该脚本前请仔细阅读使用说明】内部网首页左上角增加 Dr.com 入口;免去进入 Blackboard 的繁琐步骤;自动登录(不可用)进入 blackboard, ehall, Dr.com 等页面;自动填写选课系统账号密码;【有问题可以进行反馈,如果觉得不错,欢迎收藏或在反馈留下好评;如果愿意打赏一穷二白的作者,作者将感激不尽!】

当前为 2020-10-27 提交的版本,查看 最新版本

// ==UserScript==
// @name         SZU Auto
// @name:en      SZU Auto
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  【使用该脚本前请仔细阅读使用说明】内部网首页左上角增加 Dr.com 入口;免去进入 Blackboard 的繁琐步骤;自动登录(不可用)进入 blackboard, ehall, Dr.com 等页面;自动填写选课系统账号密码;【有问题可以进行反馈,如果觉得不错,欢迎收藏或在反馈留下好评;如果愿意打赏一穷二白的作者,作者将感激不尽!】
// @description:en  【使用该脚本前请仔细阅读使用说明】内部网首页左上角增加 Dr.com 入口;免去进入 Blackboard 的繁琐步骤;自动登录(不可用)进入 blackboard, ehall, Dr.com 等页面;自动填写选课系统账号密码;【有问题可以进行反馈,如果觉得不错,欢迎收藏或在反馈留下好评;如果愿意打赏一穷二白的作者,作者将感激不尽!】
// @author       cc
// @match        https://elearning.szu.edu.cn/*
// @match        https://authserver.szu.edu.cn/*
// @match        https://drcom.szu.edu.cn/*
// @match        https://www1.szu.edu.cn/*
// @match        http://ehall.szu.edu.cn/*
// @match        http://bkxk.szu.edu.cn/*
// @match        172.30.255.2/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    const STUDENT_ID = 'Your student id';
    const CARD_ID = 'Your card id';
    const PASSWORD = 'Your password';
    const RECURSION_DURATION = 250;
    var extra_times = 0;
    (function recursion () {
        if (location.host == 'elearning.szu.edu.cn') {
            if (location.href == 'https://elearning.szu.edu.cn/' || location.href == 'https://elearning.szu.edu.cn/webapps/login/') {
                let span = document.querySelector('table table table tr td a span');
                if (span) {
                    span.click();
                };
            } else if (location.href.includes('webapps/portal/')) {
                let button_1 = document.querySelector('.button-1');
                if (button_1) {
                    button_1.click();
                };
            };
        } else if (location.host == 'authserver.szu.edu.cn') {
            let username = document.getElementById('username');
            let password = document.getElementById('password');
            let button = document.querySelector('button');
            if (username && password && button) {
                username.value = CARD_ID;
                password.value = PASSWORD;
                extra_times = 750;
                button.click();
                setTimeout(() => { extra_times = 0; }, RECURSION_DURATION);
            };
        } else if (location.host == 'ehall.szu.edu.cn') {
            let ampHasNoLogin = document.getElementById('ampHasNoLogin');
            if (ampHasNoLogin) {
                ampHasNoLogin.click();
            };
        } else if (location.host == '172.30.255.2') {
            if (location.href.includes('.htm')) {
                let username = document.getElementById('username');
                let password = document.getElementById('password');
                let submit = document.querySelector('#submit[type=submit]');
                if (username && password && submit) {
                    username.value = CARD_ID;
                    password.value = PASSWORD;
                    submit.click();
                };
            };
        } else if (location.host == 'drcom.szu.edu.cn') {
            if (location.href.includes('.htm')) {
                let username = document.querySelector('input[name=DDDDD]');
                let password = document.querySelector('input[name=upass]');
                let submit = document.querySelector('input[type=submit]');
                if (username && password && submit) {
                    username.value = CARD_ID;
                    password.value = PASSWORD;
                    submit.click();
                };
            };
        } else if (location.host == 'www1.szu.edu.cn') {
            let a = document.querySelector("a[href='v.asp?id=136']");
            let a_new = document.getElementById('drcom');
            if (a && !a_new) {
                a_new = document.createElement('a');
                a_new.href = 'http://172.30.255.2/0.htm';
                a_new.id = 'drcom';
                a_new.innerHTML = '|登录(不可用) Dr.com';
                a.parentNode.appendChild(a_new);
            };
        } else if (location.host == 'bkxk.szu.edu.cn') {
            let loginName = document.getElementById('loginName');
            let loginPwd = document.getElementById('loginPwd');
            if (loginName && loginPwd) {
                loginName.value = STUDENT_ID;
                loginPwd.value = PASSWORD;
            };
        };
        setTimeout(recursion, RECURSION_DURATION + extra_times);
    })();
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址