mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Script help redirect changed
This commit is contained in:
parent
f719bf2700
commit
d06e990044
1 changed files with 9 additions and 7 deletions
|
@ -46,7 +46,7 @@
|
||||||
// : Script header {{{
|
// : Script header {{{
|
||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Moodle/Elearning/KMOOC test help
|
// @name Moodle/Elearning/KMOOC test help
|
||||||
// @version 2.1.2.0
|
// @version 2.1.2.1
|
||||||
// @description Online Moodle/Elearning/KMOOC test help
|
// @description Online Moodle/Elearning/KMOOC test help
|
||||||
// @author MrFry
|
// @author MrFry
|
||||||
// @match https://elearning.uni-obuda.hu/*
|
// @match https://elearning.uni-obuda.hu/*
|
||||||
|
@ -1640,7 +1640,7 @@
|
||||||
var firstRun = getVal('firstRun') // if the current run is the frst
|
var firstRun = getVal('firstRun') // if the current run is the frst
|
||||||
if (firstRun === undefined || firstRun === true) {
|
if (firstRun === undefined || firstRun === true) {
|
||||||
setVal('firstRun', false)
|
setVal('firstRun', false)
|
||||||
ShowHelp('firstRun') // showing help
|
ShowHelp(true) // showing help
|
||||||
registerScript()
|
registerScript()
|
||||||
|
|
||||||
document.write(texts.freshStartWarning)
|
document.write(texts.freshStartWarning)
|
||||||
|
@ -2559,12 +2559,14 @@
|
||||||
// : Help {{{
|
// : Help {{{
|
||||||
|
|
||||||
// shows some neat help
|
// shows some neat help
|
||||||
function ShowHelp(query) {
|
function ShowHelp(firstRun) {
|
||||||
let q = 'scriptMenu'
|
let q = '?tab=script'
|
||||||
if (query) {
|
if (firstRun) {
|
||||||
q = query
|
q += '&firstRun=true'
|
||||||
|
} else {
|
||||||
|
q += '&fromScript=true'
|
||||||
}
|
}
|
||||||
openInTab(serverAdress + `faq${q ? '?' + q : ''}`, {
|
openInTab(serverAdress + q, {
|
||||||
active: true,
|
active: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue