mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-11 08:14:11 +08:00
fixed a bug where you could start typing during the page transition resulting in a never ending test
This commit is contained in:
parent
008e52591b
commit
08e374ed1e
1 changed files with 16 additions and 13 deletions
|
@ -263,7 +263,7 @@ function copyResultToClipboard() {
|
|||
$(".pageTest .loginTip").removeClass("hidden");
|
||||
})
|
||||
.catch((f) => {
|
||||
open(URL.createObjectURL(blob))
|
||||
open(URL.createObjectURL(blob));
|
||||
$(".notification").removeClass("hidden");
|
||||
Misc.showNotification("Error saving image to clipboard", 2000);
|
||||
$(".pageTest .ssWatermark").addClass("hidden");
|
||||
|
@ -271,15 +271,15 @@ function copyResultToClipboard() {
|
|||
if (firebase.auth().currentUser == null)
|
||||
$(".pageTest .loginTip").removeClass("hidden");
|
||||
});
|
||||
} catch(e) {
|
||||
open(URL.createObjectURL(blob))
|
||||
$(".notification").removeClass("hidden");
|
||||
Misc.showNotification("Error saving image to clipboard", 2000);
|
||||
$(".pageTest .ssWatermark").addClass("hidden");
|
||||
$(".pageTest .buttons").removeClass("hidden");
|
||||
if (firebase.auth().currentUser == null)
|
||||
$(".pageTest .loginTip").removeClass("hidden");
|
||||
}
|
||||
} catch (e) {
|
||||
open(URL.createObjectURL(blob));
|
||||
$(".notification").removeClass("hidden");
|
||||
Misc.showNotification("Error saving image to clipboard", 2000);
|
||||
$(".pageTest .ssWatermark").addClass("hidden");
|
||||
$(".pageTest .buttons").removeClass("hidden");
|
||||
if (firebase.auth().currentUser == null)
|
||||
$(".pageTest .loginTip").removeClass("hidden");
|
||||
}
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
|
@ -724,9 +724,9 @@ function punctuateWord(previousWord, currentWord, index, maxindex) {
|
|||
|
||||
if (
|
||||
(index == 0 ||
|
||||
Misc.getLastChar(previousWord) == "." ||
|
||||
Misc.getLastChar(previousWord) == "?" ||
|
||||
Misc.getLastChar(previousWord) == "!") &&
|
||||
Misc.getLastChar(previousWord) == "." ||
|
||||
Misc.getLastChar(previousWord) == "?" ||
|
||||
Misc.getLastChar(previousWord) == "!") &&
|
||||
config.language.split("_")[0] != "code"
|
||||
) {
|
||||
//always capitalise the first word or if there was a dot unless using a code alphabet
|
||||
|
@ -2632,6 +2632,9 @@ function showResult(difficultyFailed = false) {
|
|||
}
|
||||
|
||||
function startTest() {
|
||||
if (pageTransition) {
|
||||
return;
|
||||
}
|
||||
if (!dbConfigLoaded) {
|
||||
configChangedBeforeDb = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue