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 {{{
|
||||
// ==UserScript==
|
||||
// @name Moodle/Elearning/KMOOC test help
|
||||
// @version 2.1.2.0
|
||||
// @version 2.1.2.1
|
||||
// @description Online Moodle/Elearning/KMOOC test help
|
||||
// @author MrFry
|
||||
// @match https://elearning.uni-obuda.hu/*
|
||||
|
@ -1640,7 +1640,7 @@
|
|||
var firstRun = getVal('firstRun') // if the current run is the frst
|
||||
if (firstRun === undefined || firstRun === true) {
|
||||
setVal('firstRun', false)
|
||||
ShowHelp('firstRun') // showing help
|
||||
ShowHelp(true) // showing help
|
||||
registerScript()
|
||||
|
||||
document.write(texts.freshStartWarning)
|
||||
|
@ -2559,12 +2559,14 @@
|
|||
// : Help {{{
|
||||
|
||||
// shows some neat help
|
||||
function ShowHelp(query) {
|
||||
let q = 'scriptMenu'
|
||||
if (query) {
|
||||
q = query
|
||||
function ShowHelp(firstRun) {
|
||||
let q = '?tab=script'
|
||||
if (firstRun) {
|
||||
q += '&firstRun=true'
|
||||
} else {
|
||||
q += '&fromScript=true'
|
||||
}
|
||||
openInTab(serverAdress + `faq${q ? '?' + q : ''}`, {
|
||||
openInTab(serverAdress + q, {
|
||||
active: true,
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue