@ -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") {
} else {
toastText = "Can not copy to clipboard in insecure context.";
}
// Find snackbar element
const snackbar = dom.snackbar();