From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on gnuweeb.org X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,URIBL_BLOCKED, URIBL_DBL_BLOCKED_OPENDNS autolearn=ham autolearn_force=no version=3.4.6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gnuweeb.org; s=default; t=1695416351; bh=HXFJxOwzyIqvAjEAn2u1rnP5DfIdMbhOd8Flgs3jA04=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=T8BCHNHDcwvtTEMHAHZrUJW4UFch/aiHBzVAvgiGgUK4YizaDfHCvsnEA8+Fx7ZiP mKZT56afDEygyGiKmr0prImV2Zt2G6UD6tXmx64dmlSjc63GPlgO30N8w6Y5DsDji/ mc/PNW/y9dqKwNqLC48I37oY3apuV07cx8unHaTIAsnvRPlB5QMgZXiGNltjuUxFTw QaXM2i3sFlNVq7c+kICembcs5BUveL0c1BVPxCmT8R5cTrebq6gtIcPilQ+nUawotK TQ11zQ8yTCXL4r0OusLPaeurGApEIn6MlANbcDpCJsyFJ10eTPMNu8sxHIh49laZZQ Lq4PyYS+E/IvQ== Received: from localhost.localdomain (unknown [175.158.50.129]) by gnuweeb.org (Postfix) with ESMTPSA id 62D1424B68B; Sat, 23 Sep 2023 03:59:09 +0700 (WIB) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Arthur Lapz , Memet Zx , GNU/Weeb Mailing List Subject: [PATCH v1 04/11] feat(page): improve UX for copying text Date: Sat, 23 Sep 2023 03:58:10 +0700 Message-Id: <20230922205817.107-5-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230922205817.107-1-kiizuha@gnuweeb.org> References: <20230922205817.107-1-kiizuha@gnuweeb.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This commit introduces an improvement to the user experience when copying text. Now, when a user clicks the copy button or the copy text area, the background color of the copy button will change. This visual feedback enhances the user experience by providing a highlight effect upon clicking, making it more intuitive and user-friendly. Signed-off-by: Muhammad Rizki --- index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/index.html b/index.html index 86853f6..e9da0a7 100644 --- a/index.html +++ b/index.html @@ -252,8 +252,10 @@ var text = document.getElementById("copy-text").innerText; navigator.clipboard.writeText(text); copyText.innerText = "Copied!"; + copyText.classList.add("bg-neutral-800"); setTimeout(function () { copyText.innerText = "Copy"; + copyText.classList.remove("bg-neutral-800"); }, 3000); } -- Muhammad Rizki