Reset some testing variables

This commit is contained in:
MrFry 2020-04-09 12:51:16 +02:00
parent 7bccf3c7ee
commit 6504ec2b0b

View file

@ -62,8 +62,8 @@
var addEventListener // add event listener function
const serverAdress = 'https://qmining.frylabs.net/'
// const serverAdress = 'http://localhost:8080/'
// const apiAdress = 'https://api.frylabs.net/'
const apiAdress = 'http://localhost:80/'
const apiAdress = 'https://api.frylabs.net/'
// const apiAdress = 'http://localhost:80/'
const ircAddress = 'https://kiwiirc.com/nextclient/irc.sub.fm/#qmining'
// forcing pages for testing. unless you test, do not set these to true!
@ -75,8 +75,7 @@
const log = true
const motdShowCount = 3 /* Ammount of times to show motd */
// TODO: set to 60
const infoExpireTime = 1 // Every n seconds basic info should be loaded from server
const infoExpireTime = 60 // Every n seconds basic info should be loaded from server
var motd = ''
var lastestVersion = ''
var subjInfo
@ -1553,6 +1552,7 @@
loginButton.innerText = 'Login'
const loginInput = document.createElement('input')
loginInput.type = 'password'
loginInput.style.width = '400px'
loginInput.style.textAlign = 'center'
if (getVal('clientId') && getVal('clientId')[0] !== 0) {
loginInput.value = getVal('clientId') || ''
@ -1565,7 +1565,6 @@
loginButton.addEventListener('click', function () {
if (loginInput.value === getVal('clientId').toString()) {
console.log('opening veteran pw page ...')
openInTab(serverAdress + 'getVeteranPw?cid=' + getVal('clientId'), {
active: true
})
@ -1719,6 +1718,8 @@
xmlhttpRequest({
method: 'GET',
url: url,
crossDomain: true,
xhrFields: { withCredentials: true },
headers: {
'Content-Type': 'application/json'
},
@ -1811,7 +1812,8 @@
xmlhttpRequest({
method: 'POST',
url: url,
// xhrFields: { withCredentials: true },
crossDomain: true,
xhrFields: { withCredentials: true },
data: message,
headers: {
'Content-Type': 'application/json'