diff --git a/public/index.html b/public/index.html index a96945d23..622a74572 100644 --- a/public/index.html +++ b/public/index.html @@ -292,7 +292,7 @@

quick tab mode

-
Press tab to quickly restart the test. This function disables tab navigation on some parts of the website.
+
Press tab to quickly restart the test, or to quickly jump to the test page. This function disables tab navigation on the website.
on
off
diff --git a/public/js/script.js b/public/js/script.js index 132709416..036236528 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -1832,15 +1832,19 @@ $(document).keydown((event) => { //tab if (event["keyCode"] == 9) { - if (config.quickTab && $(".pageTest").hasClass("active")) { + if (config.quickTab) { event.preventDefault(); - if (testActive && !afkDetected) { - let testNow = Date.now(); - let testSeconds = roundTo2((testNow - testStart) / 1000); - incompleteTestSeconds += testSeconds; - restartCount++; + if($(".pageTest").hasClass("active")){ + if (testActive && !afkDetected) { + let testNow = Date.now(); + let testSeconds = roundTo2((testNow - testStart) / 1000); + incompleteTestSeconds += testSeconds; + restartCount++; + } + restartTest(); + }else{ + changePage('test'); } - restartTest(); } }