mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-08 22:50:00 +08:00
restarting the page if the user changes the page. fixes #47
This commit is contained in:
parent
cb210fd863
commit
ac42a9b174
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue