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_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=1695460547; bh=HXFJxOwzyIqvAjEAn2u1rnP5DfIdMbhOd8Flgs3jA04=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=rr1wdw12ljVSjYmvzmexyhsqAssp4POxzDeF5Kd7Yi6jNlEp1DmAZCOK+ein2jm5G B6zA+0Lq+gZBXBu1D33Lim76Vhy5uFT+d3VIcmKFDyNCpA/2cwT9x7FEByPnk+rQX4 zVmnkovwAK/jI7OlbDiCUuBHyr4KiT87C92dovotThbLiQK5TUYc8w3w3bZNUH7jxR ZHoweZcbELfEDbGAB3ixp0HfwTgPN+BrJVmOeNOlfXq78Dn06Ag4LcJeIsaxcbcIw8 hWsUMbbbEhsomDYiyIaE3+VK2jEH1UDSOSJ/6WRleBSuQ13GeK9eLnIG0PF17iEf2J pBXVrASpJuHXA== Received: from localhost.localdomain (unknown [175.158.50.129]) by gnuweeb.org (Postfix) with ESMTPSA id 8559524B6CE; Sat, 23 Sep 2023 16:15:45 +0700 (WIB) From: Muhammad Rizki To: Ammar Faizi Cc: Muhammad Rizki , Alviro Iskandar Setiawan , Arthur Lapz , Memet Zx , GNU/Weeb Mailing List Subject: [PATCH v2 04/11] feat(page): improve UX for copying text Date: Sat, 23 Sep 2023 16:15:07 +0700 Message-Id: <20230923091514.1835-5-kiizuha@gnuweeb.org> X-Mailer: git-send-email 2.34.1.windows.1 In-Reply-To: <20230923091514.1835-1-kiizuha@gnuweeb.org> References: <20230923091514.1835-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