Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

chore: remove global copyToClipboard helper

peaklabs-devbd6398e649dc
diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php
index a97d8c1df7..82b8cbcbdb 100644
--- a/resources/views/layouts/base.blade.php
+++ b/resources/views/layouts/base.blade.php
@@ -225,30 +225,6 @@
let checkHealthInterval = null;
let checkIfIamDeadInterval = null;
- async function copyToClipboard(text) {
- try {
- if (navigator.clipboard?.writeText && window.isSecureContext) {
- await navigator.clipboard.writeText(text);
- } else {
- const textarea = document.createElement('textarea');
- textarea.value = text;
- textarea.setAttribute('readonly', '');
- textarea.style.position = 'fixed';
- textarea.style.left = '-9999px';
- document.body.appendChild(textarea);
- textarea.select();
- const copied = document.execCommand('copy');
- document.body.removeChild(textarea);
- if (!copied) {
- throw new Error('Copy command was rejected.');
- }
- }
- window.Livewire.dispatch('success', 'Copied to clipboard.');
- } catch (error) {
- window.Livewire.dispatch('error', 'Failed to copy to clipboard.');
- }
- }
- window.copyToClipboard = copyToClipboard;
document.addEventListener('livewire:init', () => {
window.Livewire.on('reloadWindow', (timeout) => {
if (timeout) {