Skip to content

Instantly share code, notes, and snippets.

@muddlebee
Forked from lightsing/casAutoLogin.user.js
Created May 14, 2018 11:57
Show Gist options
  • Save muddlebee/206df6396d43cd8e35c10c55b3894c66 to your computer and use it in GitHub Desktop.
Save muddlebee/206df6396d43cd8e35c10c55b3894c66 to your computer and use it in GitHub Desktop.
CAS Auto Login Script
// ==UserScript==
// @name CAS Auto Login
// @namespace lab.lightsing.me
// @version 0.1
// @description CAS Auto Login
// @author lightsing
// @match https://cas.sustc.edu.cn/*
// ==/UserScript==
(function() {
'use strict';
var username = document.getElementById("username");
var password = document.getElementById("password");
var login_btn = document.getElementsByClassName("btn-submit")[0];
if (username !== undefined){
username.value = "Student ID";
password.value = "Password";
login_btn.click();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment