diff --git a/macrovision.html b/macrovision.html index 8778ccea..9f7402f8 100644 --- a/macrovision.html +++ b/macrovision.html @@ -39,7 +39,16 @@
diff --git a/macrovision.js b/macrovision.js index d60cd12c..e28e6abf 100644 --- a/macrovision.js +++ b/macrovision.js @@ -5,6 +5,8 @@ let prevSelectedEntity = null; let entityIndex = 0; +let firsterror = true; + let clicked = null; let movingInBounds = false; let dragging = false; @@ -3179,7 +3181,6 @@ document.addEventListener("DOMContentLoaded", () => { document.querySelector("#copy-screenshot").addEventListener("click", e => { copyScreenshot(); - toast("Copied to clipboard!"); }); document.querySelector("#save-screenshot").addEventListener("click", e => { @@ -5095,7 +5096,11 @@ function copyScreenshot() { new ClipboardItem({ "image/png": blob }) - ]); + ]).then(e => + toast("Copied to clipboard!")) + .catch(e => { + toast("Couldn't write to the clipboard. Make sure the screenshot completes before switching tabs.") + }) }); drawScales(false); }