feat: automatically update copyright year

- Wrapped the copyright year in index.html with a span id="currentYear".
- Added JavaScript to script.js to dynamically set the year to the current year.
This commit is contained in:
google-labs-jules[bot] committed 2025-12-31 16:46:05 +00:00
1 parent fb582bfca0
commit 09f4e364e5
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();