diff --git a/res/sample-questions.tsv b/res/sample-questions.tsv index 3dbd0a3..8894334 100644 --- a/res/sample-questions.tsv +++ b/res/sample-questions.tsv @@ -2,7 +2,7 @@ ChooseAny Which Materials can be used to fabricate the brake pedal? "Steel Aluminium Titanum All the above" "1 -2" 0.3 +2" 3 ChooseOne What is depicted on the picture "7 speed double clutch transmission for AWD 8 speed double clutch transmission for AWD 7 speed double clutch transmission for 2WD diff --git a/web/quiz.js b/web/quiz.js index e628566..b02ee58 100644 --- a/web/quiz.js +++ b/web/quiz.js @@ -54,6 +54,18 @@ function startTotalTimer() { } +function skipWaitNextQuestion(event) { + + if (!event.ctrlKey || !event.shiftKey) + return + + console.log('Skipping/Bypassing wait timer') + + state.submitTimer = 0 + updateSubmitTimer() + +} + function updateSubmitInfo() { var button = document.getElementById('quizSubmitButton') @@ -63,13 +75,15 @@ function updateSubmitInfo() { if (state.submitTimer > 0) { si.innerHTML = state.waitNextQuestion ? 'Waiting for next question' : 'Wait to retry' button.value = 'Wait ' + formatTime(state.submitTimer) - button.disabled = true + button.readOnly = true + button.addEventListener('click', skipWaitNextQuestion) return } } si.innerHTML = '' - button.disabled = false + button.readOnly = false + button.removeEventListener('click', skipWaitNextQuestion) if (getRule('questionTimeout')) { if (state.submitTimer > 0) { diff --git a/web/style.css b/web/style.css index 9615ab0..59582f6 100644 --- a/web/style.css +++ b/web/style.css @@ -84,7 +84,7 @@ input[type="button"].center, input[type="submit"].center { float: none; } -input[type="button"]:disabled, input[type="submit"]:disabled { +input[type="button"][readonly], input[type="submit"][readonly] { cursor: auto; background: #888 !important; }