mirror of
https://gitlab.com/MrFry/moodle-test-userscript
synced 2025-04-01 20:22:48 +02:00
Added some logging on certain exceptions
This commit is contained in:
parent
6ec179fdf9
commit
ac20abbb69
1 changed files with 11 additions and 5 deletions
16
main.js
16
main.js
|
@ -22,8 +22,7 @@
|
|||
|
||||
var data; // all data, which is in the resource txt
|
||||
var addEventListener; // add event listener function
|
||||
const lastChangeLog =
|
||||
'- Passzív mód: ha bepipálod a menü gomb alatt, akkor nem tölti be minden alkalommal a kérdéseket (csak csendben vár).\n - Pár lényeges bugfix\n - Ha találkoztok bugokkal, akkor pls report! thanx';
|
||||
const lastChangeLog = ''; // TODO
|
||||
const serverAdress = "https://qmining.tk/";
|
||||
|
||||
// forcing pages for testing. unless you test, do not set these to true!
|
||||
|
@ -522,6 +521,7 @@ class ResultsPageModell {
|
|||
currQuestion = this.GetCurrQuestion(i);
|
||||
} catch (e) {
|
||||
currQuestion = "REEEEEEEEEEEEEEEEEEEEE"; // this shouldnt really happen sry guys
|
||||
Log("Unable to get question in GetQuestionFromResult");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1055,7 +1055,9 @@ var AlertOnNoQuestion = (i) => {
|
|||
try {
|
||||
if (i >= data.length)
|
||||
document.getElementById("HelperMenuButton").style.background = "yellow";
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
Log("Unable to get helper menu button");
|
||||
}
|
||||
};
|
||||
|
||||
//: }}}
|
||||
|
@ -1068,7 +1070,9 @@ function HandleUI(url, count, subjCount) {
|
|||
try // try, cus im suspicious
|
||||
{
|
||||
newVersion = GM_info.script.version !== GM_getValue("lastVerson");
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
Log("Some weird error trying to set new verison");
|
||||
}
|
||||
var greetMsg = ""; // message to show at the end
|
||||
var timeout = null; // the timeout. if null, it wont be hidden
|
||||
// no new version, nothing loaded
|
||||
|
@ -1292,7 +1296,9 @@ function GetImageFormResult(i) {
|
|||
temp = JSON.stringify(imgURL);
|
||||
return temp;
|
||||
}
|
||||
} catch (e) {}
|
||||
} catch (e) {
|
||||
Log("Couldn't get images from result");
|
||||
}
|
||||
}
|
||||
|
||||
// saves the current quiz. questionData contains the active subjects questions
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue