Introduce timer skip/bypass using Ctrl+Shift (Resolves #10)

This commit is contained in:
Oskar Winkels 2021-02-09 12:02:42 +01:00
parent 314c9e8c67
commit 64ca89eefb
3 changed files with 18 additions and 4 deletions

View File

@ -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

1 ChooseAny Which Materials can be used to fabricate the brake pedal? Steel Aluminium Titanum All the above 1 2 0.3 3
2 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 Automatic transmission with torque conventer 1 This gearbox is from the 2017 Bugatti Chiron FSCzech https://i.ibb.co/56LM89v/chiron-transmission.jpg 5 5
3 Text Calculate the (1) torsional- and (2) bending-nominal stress at the critical cross section for the load case shown below. Answer in N / mm² and round to one decimal place. Given: P = 12kW; n = 980 1/min; F = 500 N; xkrit = 110 mm; 0 ≤ x0 ≤ 120mm torsional-nominal stress bending-nominal stress 18.2 17.1 https://i.ibb.co/1r3yqY7/2b.png https://i.ibb.co/tYTdw86/2a.png 7 7
4
5
6
7
8

View File

@ -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) {

View File

@ -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;
}