From b8b4af45a57017e9ed58620667e58a97dea038fe Mon Sep 17 00:00:00 2001 From: mrfry Date: Sun, 6 Feb 2022 18:48:36 +0100 Subject: [PATCH] Added some logs --- stable.user.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/stable.user.js b/stable.user.js index b6630e0..e3a00fe 100755 --- a/stable.user.js +++ b/stable.user.js @@ -1115,13 +1115,10 @@ prevLength = kkerdesElements.length clearAllMessages() if (determineCurrentSite() === 'TEST') { - log('Handling quiz') handleKGKQuiz(url) } else if (determineCurrentSite() === 'RESULT') { - log('Handling results') HandleKGKResults(url) } else { - log('Handling UI') HandleUI() } } @@ -1372,6 +1369,7 @@ return false // TODO :insert real url }, action: (url) => { + log('Handling canvas quiz') handleCanvasQuiz(url) }, }, @@ -1380,6 +1378,7 @@ return false // TODO :insert real url }, action: (url) => { + log('Handling canvas results') HandleCanvasResults(url) }, }, @@ -1388,6 +1387,7 @@ return false // TODO :insert real url }, action: (url) => { + log('Handling canvas default action') HandleUI(url) }, }, @@ -1415,6 +1415,7 @@ return true // TODO :insert real url }, action: (url) => { + log('Handling KGK default action') handleKGKSite(url) }, }, @@ -1429,6 +1430,7 @@ ) }, action: () => { + log('Handling moodle quiz') handleMoodleQuiz() }, }, @@ -1440,6 +1442,7 @@ ) }, action: (url) => { + log('Handling moodle results') HandleMoodleResults(url) }, }, @@ -1453,6 +1456,7 @@ ) }, action: (url) => { + log('Handling moodle default action') HandleUI(url) }, }, @@ -1469,6 +1473,7 @@ matcher.matchString === 'default' || matcher.matchString.includes(forcedMatchString) ) { + log(`trying '${matcher.matchString}'`) if (matcher.testPage && matcher.testPage.match(url)) { matcher.testPage.action(url) return true @@ -1479,7 +1484,7 @@ matcher.default.action(url) return true } else { - console.warn( + warn( 'Matcher did not have matched handler implemented, or there was no match!', matcher ) @@ -2728,8 +2733,8 @@ } }) } catch (e) { - console.warn('Error in createHtml') - console.warn(e) + warn('Error in createHtml') + warn(e) } }