mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-25 15:24:03 +08:00
fix random characters showing on screenshot (#3238) devkennyy
* hide nocss and noscript elements when taking screenshot * remove hidden class from elements
This commit is contained in:
parent
94bfd02e49
commit
4092d45887
1 changed files with 4 additions and 0 deletions
|
@ -250,6 +250,8 @@ export async function screenshot(): Promise<void> {
|
|||
$(".pageTest .ssWatermark").addClass("hidden");
|
||||
$(".pageTest .ssWatermark").text("monkeytype.com");
|
||||
$(".pageTest .buttons").removeClass("hidden");
|
||||
$("noscript").removeClass("hidden");
|
||||
$("#nocss").removeClass("hidden");
|
||||
if (revertCookie) $("#cookiePopupWrapper").removeClass("hidden");
|
||||
if (revealReplay) $("#resultReplay").removeClass("hidden");
|
||||
if (Auth.currentUser == null) {
|
||||
|
@ -288,6 +290,8 @@ export async function screenshot(): Promise<void> {
|
|||
$("#notificationCenter").addClass("hidden");
|
||||
$("#commandLineMobileButton").addClass("hidden");
|
||||
$(".pageTest .loginTip").addClass("hidden");
|
||||
$("noscript").addClass("hidden");
|
||||
$("#nocss").addClass("hidden");
|
||||
if (revertCookie) $("#cookiePopupWrapper").addClass("hidden");
|
||||
try {
|
||||
const paddingX = 50;
|
||||
|
|
Loading…
Reference in a new issue