Merge pull request #2 from xixu-me/auto-update-copyright-year-16256968688461913671

Auto-update copyright year
This commit is contained in:
xixu-me authored and GitHub committed 2026-01-01 00:47:41 +08:00
commit 3df6250fa1
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -474,7 +474,7 @@
>
</p>
<p class="mt-1">
Copyright &copy; 2025
Copyright &copy; <span id="currentYear">2025</span>
<a
href="https://xi-xu.me"
target="_blank"
+6
View File
@@ -696,6 +696,12 @@ document.addEventListener("DOMContentLoaded", () => {
updateSwapButtonState(); // Initialize swap button state
lucide.createIcons(); // Initialize Lucide icons
// Update copyright year
const currentYearElement = document.getElementById("currentYear");
if (currentYearElement) {
currentYearElement.textContent = new Date().getFullYear();
}
// Initial auto-translate if there's existing text
if (elements.inputText.value.trim()) {
scheduleAutoTranslate();