mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Reset some testing variables
This commit is contained in:
parent
7bccf3c7ee
commit
6504ec2b0b
1 changed files with 8 additions and 6 deletions
|
@ -62,8 +62,8 @@
|
||||||
var addEventListener // add event listener function
|
var addEventListener // add event listener function
|
||||||
const serverAdress = 'https://qmining.frylabs.net/'
|
const serverAdress = 'https://qmining.frylabs.net/'
|
||||||
// const serverAdress = 'http://localhost:8080/'
|
// const serverAdress = 'http://localhost:8080/'
|
||||||
// const apiAdress = 'https://api.frylabs.net/'
|
const apiAdress = 'https://api.frylabs.net/'
|
||||||
const apiAdress = 'http://localhost:80/'
|
// const apiAdress = 'http://localhost:80/'
|
||||||
const ircAddress = 'https://kiwiirc.com/nextclient/irc.sub.fm/#qmining'
|
const ircAddress = 'https://kiwiirc.com/nextclient/irc.sub.fm/#qmining'
|
||||||
|
|
||||||
// forcing pages for testing. unless you test, do not set these to true!
|
// forcing pages for testing. unless you test, do not set these to true!
|
||||||
|
@ -75,8 +75,7 @@
|
||||||
const log = true
|
const log = true
|
||||||
|
|
||||||
const motdShowCount = 3 /* Ammount of times to show motd */
|
const motdShowCount = 3 /* Ammount of times to show motd */
|
||||||
// TODO: set to 60
|
const infoExpireTime = 60 // Every n seconds basic info should be loaded from server
|
||||||
const infoExpireTime = 1 // Every n seconds basic info should be loaded from server
|
|
||||||
var motd = ''
|
var motd = ''
|
||||||
var lastestVersion = ''
|
var lastestVersion = ''
|
||||||
var subjInfo
|
var subjInfo
|
||||||
|
@ -1553,6 +1552,7 @@
|
||||||
loginButton.innerText = 'Login'
|
loginButton.innerText = 'Login'
|
||||||
const loginInput = document.createElement('input')
|
const loginInput = document.createElement('input')
|
||||||
loginInput.type = 'password'
|
loginInput.type = 'password'
|
||||||
|
loginInput.style.width = '400px'
|
||||||
loginInput.style.textAlign = 'center'
|
loginInput.style.textAlign = 'center'
|
||||||
if (getVal('clientId') && getVal('clientId')[0] !== 0) {
|
if (getVal('clientId') && getVal('clientId')[0] !== 0) {
|
||||||
loginInput.value = getVal('clientId') || ''
|
loginInput.value = getVal('clientId') || ''
|
||||||
|
@ -1565,7 +1565,6 @@
|
||||||
|
|
||||||
loginButton.addEventListener('click', function () {
|
loginButton.addEventListener('click', function () {
|
||||||
if (loginInput.value === getVal('clientId').toString()) {
|
if (loginInput.value === getVal('clientId').toString()) {
|
||||||
console.log('opening veteran pw page ...')
|
|
||||||
openInTab(serverAdress + 'getVeteranPw?cid=' + getVal('clientId'), {
|
openInTab(serverAdress + 'getVeteranPw?cid=' + getVal('clientId'), {
|
||||||
active: true
|
active: true
|
||||||
})
|
})
|
||||||
|
@ -1719,6 +1718,8 @@
|
||||||
xmlhttpRequest({
|
xmlhttpRequest({
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
url: url,
|
url: url,
|
||||||
|
crossDomain: true,
|
||||||
|
xhrFields: { withCredentials: true },
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
},
|
},
|
||||||
|
@ -1811,7 +1812,8 @@
|
||||||
xmlhttpRequest({
|
xmlhttpRequest({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: url,
|
url: url,
|
||||||
// xhrFields: { withCredentials: true },
|
crossDomain: true,
|
||||||
|
xhrFields: { withCredentials: true },
|
||||||
data: message,
|
data: message,
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue