Last active
October 17, 2018 06:07
-
-
Save nondanee/110ee2c62a24d04fb81face193250daa to your computer and use it in GitHub Desktop.
do tutor counselor in UESTC without mianliao app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function JumpToVote(){ | |
let username = "???" | |
let password = "???" | |
let xhr = new XMLHttpRequest() | |
xhr.onreadystatechange = function(){ | |
if(xhr.readyState == 4 && xhr.status == 200){ | |
let data = JSON.parse(xhr.responseText) | |
let token = data.response.token | |
let uid = data.response.uid | |
window.location.href = `http://dev.tjut.cc:92/?uid=${uid}&token=${token}&source=ml` | |
} | |
} | |
xhr.open('POST','http://prodv1.tjut.cc/api/login/') | |
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded') | |
xhr.send(`account=${username}&password=${password}`) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment