mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Login button text change based on value
This commit is contained in:
parent
f8d4bf2a41
commit
3d358ccd4e
1 changed files with 10 additions and 1 deletions
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Moodle/Elearning/KMOOC test help
|
// @name Moodle/Elearning/KMOOC test help
|
||||||
// @version 2.0.1.6
|
// @version 2.0.1.7
|
||||||
// @description Online Moodle/Elearning/KMOOC test help
|
// @description Online Moodle/Elearning/KMOOC test help
|
||||||
// @author MrFry
|
// @author MrFry
|
||||||
// @match https://elearning.uni-obuda.hu/main/*
|
// @match https://elearning.uni-obuda.hu/main/*
|
||||||
|
@ -1622,6 +1622,15 @@
|
||||||
|
|
||||||
SetStyle(loginButton, buttonStyle)
|
SetStyle(loginButton, buttonStyle)
|
||||||
|
|
||||||
|
loginInput.addEventListener('keyup', (e) => {
|
||||||
|
console.log(e.target.value)
|
||||||
|
if (e.target.value === clientId) {
|
||||||
|
loginButton.innerText = texts.requestPWInsteadOfLogin
|
||||||
|
} else if (e.target.value !== '') {
|
||||||
|
loginButton.innerText = texts.login
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
loginButton.addEventListener('click', function () {
|
loginButton.addEventListener('click', function () {
|
||||||
if (loginInput.value === clientId.toString()) {
|
if (loginInput.value === clientId.toString()) {
|
||||||
openInTab(serverAdress + 'getVeteranPw?cid=' + clientId, {
|
openInTab(serverAdress + 'getVeteranPw?cid=' + clientId, {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue