mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
New domain name, and correct missing data file handling
This commit is contained in:
parent
0238991ed7
commit
3f09f08f41
4 changed files with 16 additions and 11 deletions
6
CHANGELOG
Normal file
6
CHANGELOG
Normal file
|
@ -0,0 +1,6 @@
|
|||
1.6.0.0:
|
||||
Added JSON data format
|
||||
Old one should still work
|
||||
1.6.1.0:
|
||||
Changed server domain name
|
||||
Fixed not found data file "brick"
|
|
@ -9,4 +9,5 @@ This userscript shows help during solving Moodle/Elearning/KMOOC tests online.
|
|||
<img src="http://questionmining.tk/img/5.png" width="420">
|
||||
<img src="http://questionmining.tk/img/6.png" width="420">
|
||||
|
||||
<a href="https://greasyfork.org/en/scripts/38999-moodle-elearning-kmooc-test-help">Greasyfork link</a> Navigate to here, if you want to install the script!
|
||||
<a href="https://gitlab.com/YourFriendlyNeighborhoodDealer/question-node-server">Server repository link</a>
|
2
frame.js
2
frame.js
|
@ -21,7 +21,7 @@
|
|||
|
||||
// ==UserScript==
|
||||
// @name Moodle/Elearning/KMOOC test help
|
||||
// @version 1.6.0.0
|
||||
// @version 1.6.1.0
|
||||
// @description Online Moodle/Elearning/KMOOC test help
|
||||
// @author YourFriendlyNeighborhoodDealer
|
||||
// @match https://elearning.uni-obuda.hu/main/*
|
||||
|
|
16
main.js
16
main.js
|
@ -25,9 +25,9 @@
|
|||
|
||||
var data; // all data, which is in the resource txt
|
||||
var addEventListener; // add event listener function
|
||||
var lastChangeLog =
|
||||
const lastChangeLog =
|
||||
'- Performance javítások\n - Összes tárgy letiltása alapból, mert sok tárgy van, és belassulhat :c\n- Az azért jó, hogy sok tárgy van c:\nEllenőrizd, hogy mely tárgyak aktívak a menüben!';
|
||||
var serverAdress = "https://questionmining.tk/";
|
||||
const serverAdress = "https://qmining.tk/";
|
||||
|
||||
// forcing pages for testing. unless you test, do not set these to true!
|
||||
// only one of these should be true for testing
|
||||
|
@ -37,11 +37,11 @@ const forceDefaultPage = false;
|
|||
const logElementGetting = false;
|
||||
const log = false;
|
||||
|
||||
var motdShowCount = 3;
|
||||
const motdShowCount = 3;
|
||||
var motd = "";
|
||||
var lastestVersion = "";
|
||||
var lastestVersion = ""; // TODO: if undefined no new verion
|
||||
|
||||
var minMatchAmmount = 49;
|
||||
const minMatchAmmount = 49;
|
||||
|
||||
//: Class descriptions {{{
|
||||
class Question {
|
||||
|
@ -701,9 +701,7 @@ function ReadFile(cwith) {
|
|||
try {
|
||||
resource = GM_getResourceText("data"); // getting data from txt
|
||||
if (resource == null) {
|
||||
throw {
|
||||
message: "data file not found"
|
||||
};
|
||||
return; // TODO show some msg what happened
|
||||
}
|
||||
if (EmptyOrWhiteSpace(resource)) {
|
||||
throw {
|
||||
|
@ -1752,7 +1750,7 @@ function ShowMenuList() {
|
|||
var noDataRow = tbl.insertRow();
|
||||
var noDataRowCell = noDataRow.insertCell();
|
||||
|
||||
var textBox = CreateNodeWithText(noDataRowCell, "A kérdések filet nem lehetett beolvasni.");
|
||||
var textBox = CreateNodeWithText(noDataRowCell, "A kérdéseket nem lehetett beolvasni. Vagy nem elérhető a szerver, vagy ha offline módot használsz, akkor hibás a fájl elérési útja, vagy a fájl maga. Olvasd el a manualt!");
|
||||
textBox.style.margin = fiveMargin; // fancy margin
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue