removed version 161 action, readded labels to menu

This commit is contained in:
MrFry 2019-10-03 12:37:32 +02:00
parent 86d279a670
commit 6ad2da1ac8

34
main.js
View file

@ -771,6 +771,7 @@ function Main () {
} }
}) })
console.log('Moodle Test Script run time:') console.log('Moodle Test Script run time:')
console.timeEnd('main') console.timeEnd('main')
@ -824,15 +825,12 @@ function VersionActions () {
// GM_setValue("version15", true); // GM_setValue("version15", true);
// GM_setValue("firstRun", true); // GM_setValue("firstRun", true);
// GM_setValue("version16", true); // GM_setValue("version16", true);
// GM_setValue("version161", true);
// throw "asd"; // throw "asd";
let r = FreshStart() FreshStart()
if (r !== true) { GM_setValue('version161', false) }
Version15() Version15()
Version16() Version16()
Version161()
} }
// : Version action functions {{{ // : Version action functions {{{
@ -871,19 +869,6 @@ function Version16 () {
} }
} }
function Version161 () {
var version161 = GM_getValue('version161') // if the current run is the frst
if (version161 === undefined || version161 === true) {
GM_setValue('useNetDB', '1')
GM_setValue('version161', false)
document.write(
'<h1>Moodle teszt userscript:<h1><h3>1.6.1.0 verzió: Új domain név: qmining.tk. Ha frissíted az oldalt, akkor tampremonkey rá fog kérdezni, hpgy engedélyezed-e a kérdések külését erre az új domain-re. A rendes működés érdekében kattints a "Allow always domain"-gombra</h3>'
)
document.close()
throw 'something, so this stuff stops' // eslint-disable-line
}
}
// : }}} // : }}}
var GetFileData = () => { var GetFileData = () => {
@ -1902,6 +1887,17 @@ function ShowMenuList () {
subjTable.style.textAlign = 'left' subjTable.style.textAlign = 'left'
subjTable.style.width = '98%' subjTable.style.width = '98%'
var tr = subjTable.insertRow()
var header1 = tr.insertCell()
var headerSubjInfoParagraph = CreateNodeWithText(header1, 'Tárgynév [darab kérdés]', 'center')
headerSubjInfoParagraph.style.margin = fiveMargin // fancy margin
var header2 = tr.insertCell()
var headerSubjInfoParagraph2 = CreateNodeWithText(header2, 'Aktív')
headerSubjInfoParagraph2.style.margin = fiveMargin // fancy margin
// TODO: group here
if (data && data.length > 0) { if (data && data.length > 0) {
for (let i = 0; i < data.length; i++) { for (let i = 0; i < data.length; i++) {
var subjRow = subjTable.insertRow() var subjRow = subjTable.insertRow()
@ -1977,6 +1973,8 @@ function ShowMenuList () {
GM_setValue('showSplash', splashTickBox.checked) GM_setValue('showSplash', splashTickBox.checked)
}) // adding clicktextNode }) // adding clicktextNode
CreateNodeWithText(splashTickboxCell, 'Üdvözlő üzenet mutatása minden oldalon', 'span')
// show questons tickbox ----------------------------------------------------------------------------------------------------------------------------- // show questons tickbox -----------------------------------------------------------------------------------------------------------------------------
var questionTickboxRow = tbl.insertRow() var questionTickboxRow = tbl.insertRow()
var questionTickboxCell = questionTickboxRow.insertCell() var questionTickboxCell = questionTickboxRow.insertCell()
@ -2001,6 +1999,8 @@ function ShowMenuList () {
} }
}) // adding clicktextNode }) // adding clicktextNode
CreateNodeWithText(questionTickboxCell, 'Kérdések mutatása válaszhoz', 'span')
// database mode listbox ----------------------------------------------------------------------------------------------------------------------------- // database mode listbox -----------------------------------------------------------------------------------------------------------------------------
var databasemodeListboxRow = tbl.insertRow() var databasemodeListboxRow = tbl.insertRow()
var databasemodeListboxCell = databasemodeListboxRow.insertCell() var databasemodeListboxCell = databasemodeListboxRow.insertCell()