mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-20 23:36:37 +08:00
restarting the page if the user changes the page. fixes #47
This commit is contained in:
parent
80fc3d2373
commit
9b4d69ca3c
|
@ -643,6 +643,7 @@ function changeTimeConfig(time) {
|
|||
}
|
||||
|
||||
function changePage(page) {
|
||||
restartTest();
|
||||
let activePage = $(".page.active");
|
||||
$(".page").removeClass('active');
|
||||
$("#wordsInput").focusout();
|
||||
|
@ -653,6 +654,7 @@ function changePage(page) {
|
|||
showTestConfig();
|
||||
hideSignOutButton();
|
||||
restartCount = 0;
|
||||
restartTest();
|
||||
} else if (page == "about") {
|
||||
$(".page.pageAbout").addClass('active');
|
||||
swapElements(activePage, $(".page.pageAbout"), 250);
|
||||
|
|
Loading…
Reference in a new issue