Script help redirect changed

This commit is contained in:
mrfry 2021-05-18 16:32:28 +02:00
parent f719bf2700
commit d06e990044

View file

@ -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,
})
}