mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Fixed types when comparing client id-s first character
This commit is contained in:
parent
0baf5df7d4
commit
eacd72f2ba
1 changed files with 6 additions and 5 deletions
|
@ -21,7 +21,7 @@
|
|||
|
||||
// ==UserScript==
|
||||
// @name Moodle/Elearning/KMOOC test help
|
||||
// @version 2.0.1.4
|
||||
// @version 2.0.1.5
|
||||
// @description Online Moodle/Elearning/KMOOC test help
|
||||
// @author MrFry
|
||||
// @match https://elearning.uni-obuda.hu/main/*
|
||||
|
@ -1576,8 +1576,9 @@
|
|||
loginInput.type = 'text'
|
||||
loginInput.style.width = '400px'
|
||||
loginInput.style.textAlign = 'center'
|
||||
if (getVal('clientId') && getVal('clientId')[0] !== 0) {
|
||||
loginInput.value = getVal('clientId') || ''
|
||||
const clientId = getVal('clientId')
|
||||
if (clientId && clientId.toString()[0] !== '0') {
|
||||
loginInput.value = clientId || ''
|
||||
}
|
||||
loginDiv.appendChild(loginInput)
|
||||
loginDiv.appendChild(loginButton)
|
||||
|
@ -1585,8 +1586,8 @@
|
|||
SetStyle(loginButton, buttonStyle)
|
||||
|
||||
loginButton.addEventListener('click', function () {
|
||||
if (loginInput.value === getVal('clientId').toString()) {
|
||||
openInTab(serverAdress + 'getVeteranPw?cid=' + getVal('clientId'), {
|
||||
if (loginInput.value === clientId.toString()) {
|
||||
openInTab(serverAdress + 'getVeteranPw?cid=' + clientId, {
|
||||
active: true
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue