mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Added devel mode, changed login texts
This commit is contained in:
parent
eacd72f2ba
commit
089f6d3732
1 changed files with 13 additions and 4 deletions
|
@ -60,9 +60,9 @@
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
var addEventListener // add event listener function
|
var addEventListener // add event listener function
|
||||||
const serverAdress = 'https://qmining.frylabs.net/'
|
let serverAdress = 'https://qmining.frylabs.net/'
|
||||||
// const serverAdress = 'http://localhost:8080/'
|
// const serverAdress = 'http://localhost:8080/'
|
||||||
const apiAdress = 'https://api.frylabs.net/'
|
let 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'
|
||||||
|
|
||||||
|
@ -75,11 +75,17 @@
|
||||||
const log = true
|
const log = true
|
||||||
|
|
||||||
const motdShowCount = 3 /* Ammount of times to show motd */
|
const motdShowCount = 3 /* Ammount of times to show motd */
|
||||||
const infoExpireTime = 60 // Every n seconds basic info should be loaded from server
|
let infoExpireTime = 60 // Every n seconds basic info should be loaded from server
|
||||||
var motd = ''
|
var motd = ''
|
||||||
var lastestVersion = ''
|
var lastestVersion = ''
|
||||||
var subjInfo
|
var subjInfo
|
||||||
|
|
||||||
|
if (getVal('ISDEVEL')) {
|
||||||
|
infoExpireTime = 1
|
||||||
|
serverAdress = 'http://localhost:8080/'
|
||||||
|
apiAdress = 'http://localhost:80/'
|
||||||
|
}
|
||||||
|
|
||||||
const huTexts = {
|
const huTexts = {
|
||||||
lastChangeLog: '',
|
lastChangeLog: '',
|
||||||
fatalError: 'Fatál error. Check console (f12). Kattints az üzenetre az összes kérdés/válaszért manuális kereséshez!',
|
fatalError: 'Fatál error. Check console (f12). Kattints az üzenetre az összes kérdés/válaszért manuális kereséshez!',
|
||||||
|
@ -101,6 +107,8 @@
|
||||||
invalidPW: 'Hibás jelszó: ',
|
invalidPW: 'Hibás jelszó: ',
|
||||||
search: 'Keresés ...',
|
search: 'Keresés ...',
|
||||||
loading: 'Betöltés ...',
|
loading: 'Betöltés ...',
|
||||||
|
login: 'Belépés',
|
||||||
|
requestPW: 'Jelszó kérése',
|
||||||
noServer: 'Nem elérhető a szerver!',
|
noServer: 'Nem elérhető a szerver!',
|
||||||
noUser: 'Nem vagy bejelentkezve!',
|
noUser: 'Nem vagy bejelentkezve!',
|
||||||
passiveModeActivated: 'Passzív mód bekapcsolva, nem lesz mostantól a szerver piszkálva',
|
passiveModeActivated: 'Passzív mód bekapcsolva, nem lesz mostantól a szerver piszkálva',
|
||||||
|
@ -1571,7 +1579,7 @@
|
||||||
loginDiv.style.display = 'none'
|
loginDiv.style.display = 'none'
|
||||||
loginDiv.setAttribute('id', 'loginDiv')
|
loginDiv.setAttribute('id', 'loginDiv')
|
||||||
const loginButton = document.createElement('button')
|
const loginButton = document.createElement('button')
|
||||||
loginButton.innerText = 'Login'
|
loginButton.innerText = texts.login
|
||||||
const loginInput = document.createElement('input')
|
const loginInput = document.createElement('input')
|
||||||
loginInput.type = 'text'
|
loginInput.type = 'text'
|
||||||
loginInput.style.width = '400px'
|
loginInput.style.width = '400px'
|
||||||
|
@ -1579,6 +1587,7 @@
|
||||||
const clientId = getVal('clientId')
|
const clientId = getVal('clientId')
|
||||||
if (clientId && clientId.toString()[0] !== '0') {
|
if (clientId && clientId.toString()[0] !== '0') {
|
||||||
loginInput.value = clientId || ''
|
loginInput.value = clientId || ''
|
||||||
|
loginButton.innerText = texts.requestPW
|
||||||
}
|
}
|
||||||
loginDiv.appendChild(loginInput)
|
loginDiv.appendChild(loginInput)
|
||||||
loginDiv.appendChild(loginButton)
|
loginDiv.appendChild(loginButton)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue