fix(result): word highlight element sometimes appearing on screenshots (andGuo, Miodec) (#4739)

* fix: remove word history hover element on screenshot

* newline whoopsies

* also hiding highlight container

---------

Co-authored-by: Miodec <jack@monkeytype.com>
This commit is contained in:
Andrew Guo 2023-10-24 10:11:53 -04:00 committed by GitHub
parent d2b7f41f88
commit fb5c8fd742
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -420,6 +420,8 @@ export async function screenshot(): Promise<void> {
$("#nocss").removeClass("hidden");
$("header, footer").removeClass("invisible");
$("#result").removeClass("noBalloons");
$(".wordInputHighlight").removeClass("hidden");
$(".highlightContainer").removeClass("hidden");
if (revertCookie) $("#cookiePopupWrapper").removeClass("hidden");
if (revealReplay) $("#resultReplay").removeClass("hidden");
if (!Auth?.currentUser) {
@ -459,6 +461,8 @@ export async function screenshot(): Promise<void> {
$(".page.pageTest").prepend("<div class='screenshotSpacer'></div>");
$("header, footer").addClass("invisible");
$("#result").addClass("noBalloons");
$(".wordInputHighlight").addClass("hidden");
$(".highlightContainer").addClass("hidden");
if (revertCookie) $("#cookiePopupWrapper").addClass("hidden");
(document.querySelector("html") as HTMLElement).style.scrollBehavior = "auto";