diff --git a/output/main.js b/output/main.js index b43dd21..eddaf96 100644 --- a/output/main.js +++ b/output/main.js @@ -295,7 +295,11 @@ function hideElementByID(id) { * @param {string} [toastText] - Text shown by toast. */ function copyToClipboard(text, toastText = JOIN_URL_PASTE) { - navigator.clipboard.writeText(text); + if (typeof navigator.clipboard !== "undefined") { + navigator.clipboard.writeText(text); + } else { + toastText = "Can not copy to clipboard in insecure context."; + } // Find snackbar element const snackbar = dom.snackbar();