From 568329e201a5f3d300c6b0e701ec0a4c2b756b48 Mon Sep 17 00:00:00 2001 From: Jack Date: Wed, 19 Aug 2020 17:37:08 +0100 Subject: [PATCH] hiding the notification for taking screenshots --- public/js/script.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/js/script.js b/public/js/script.js index da0c9f549..f6159072d 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -113,7 +113,7 @@ function copyResultToClipboard() { var sourceY = src.position().top; /*Y position from div#target*/ var sourceWidth = src.width(); /*clientWidth/offsetWidth from div#target*/ var sourceHeight = src.height(); /*clientHeight/offsetHeight from div#target*/ - + $(".notification").addClass("hidden"); try { html2canvas(document.body, { backgroundColor: themeColors.bg, @@ -134,11 +134,13 @@ function copyResultToClipboard() { ), ]) .then((f) => { + $(".notification").removeClass("hidden"); showNotification("Copied to clipboard", 1000); $(".pageTest .ssWatermark").addClass("hidden"); $(".pageTest .buttons").removeClass("hidden"); }) .catch((f) => { + $(".notification").removeClass("hidden"); showNotification("Error saving image to clipboard", 2000); $(".pageTest .ssWatermark").addClass("hidden"); $(".pageTest .buttons").removeClass("hidden"); @@ -146,6 +148,7 @@ function copyResultToClipboard() { }); }); } catch (e) { + $(".notification").removeClass("hidden"); showNotification("Error creating image", 2000); $(".pageTest .ssWatermark").addClass("hidden"); $(".pageTest .buttons").removeClass("hidden");