From 94bc604fbea9625d10dfd421c051a44ace235bd5 Mon Sep 17 00:00:00 2001 From: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com> Date: Fri, 13 Dec 2024 14:15:18 +0100 Subject: [PATCH] never mind fuck the fallback just use https --- .../components/modal-confirmation.blade.php | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/resources/views/components/modal-confirmation.blade.php b/resources/views/components/modal-confirmation.blade.php index e23393abb..8495417ac 100644 --- a/resources/views/components/modal-confirmation.blade.php +++ b/resources/views/components/modal-confirmation.blade.php @@ -92,28 +92,11 @@ }); }, copyConfirmationText() { - if (navigator.clipboard && window.isSecureContext) { - navigator.clipboard.writeText(this.confirmationText) - .then(() => { - this.copied = true; - setTimeout(() => { - this.copied = false; - }, 2000); - }); - } else { - const input = document.createElement('input'); - input.setAttribute('readonly', ''); - input.setAttribute('value', this.confirmationText); - document.body.appendChild(input); - input.select(); - input.setSelectionRange(0, 99999); - document.execCommand('copy'); - document.body.removeChild(input); - this.copied = true; - setTimeout(() => { - this.copied = false; - }, 2000); - } + navigator.clipboard.writeText(this.confirmationText); + this.copied = true; + setTimeout(() => { + this.copied = false; + }, 2000); }, toggleAction(id) { const index = this.selectedActions.indexOf(id);