From 5c42ff685199f7acb3c4d20188c54bd21ac91e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?O=CC=81scar=20M=2E=20Lage?= Date: Thu, 5 Dec 2024 18:36:05 +0100 Subject: [PATCH] Fix: Back to normal state after the link being copied --- assets/custom.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/assets/custom.js b/assets/custom.js index c2254b6..41ad0ab 100644 --- a/assets/custom.js +++ b/assets/custom.js @@ -1,12 +1,9 @@ -// Inicializar Clipboard.js const clipboard = new ClipboardJS(".clipboard"); -// Manejar el evento de éxito clipboard.on("success", function (e) { const clipboardDiv = e.trigger; - // Cambiar el fondo y el color del texto - clipboardDiv.classList.remove("bg-white", "hover:bg-gray-100"); + clipboardDiv.classList.remove("hover:bg-gray-100"); clipboardDiv.classList.add("bg-green-100"); // Mostrar mensaje @@ -17,6 +14,7 @@ clipboard.on("success", function (e) { setTimeout(() => { feedback.classList.add("hidden"); clipboardDiv.classList.remove("bg-green-100"); + clipboardDiv.classList.add("hover:bg-gray-100"); }, 2000); });