diff --git a/stable.user.js b/stable.user.js index d6b64e9..ccf0aa5 100755 --- a/stable.user.js +++ b/stable.user.js @@ -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'