* fix: resolve footer links, dynamic year, and security issues (fixes #20) * fix: use relative path for locale files --------- Co-authored-by: Jad <i@nocilol.me>main
parent
1bddf1f4f5
commit
f9e717aa77
|
|
@ -88,13 +88,13 @@
|
||||||
<path d="m12 3-1.9 5.8-5.8 1.9 5.8 1.9 1.9 5.8 1.9-5.8 5.8-1.9-5.8-1.9Z"></path>
|
<path d="m12 3-1.9 5.8-5.8 1.9 5.8 1.9 1.9 5.8 1.9-5.8 5.8-1.9-5.8-1.9Z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="text-sm font-bold tracking-tight text-primary md:text-xl">
|
<h1 class="text-sm font-bold tracking-tight text-primary md:text-xl">
|
||||||
<a href="/" class="hover:text-primary transition-colors" title="Gemini Watermark Remover">Gemini <span class="text-gray-700 font-medium">Watermark Remover</span></a>
|
<a href="./" class="hover:text-primary transition-colors" title="Gemini Watermark Remover">Gemini <span class="text-gray-700 font-medium">Watermark Remover</span></a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
<nav class="flex gap-2 md:gap-6 text-sm font-medium text-gray-600 items-center">
|
<nav class="flex gap-2 md:gap-6 text-sm font-medium text-gray-600 items-center">
|
||||||
<a href="/userscript/gemini-watermark-remover.user.js" target="_blank" class="hidden md:inline-block hover:text-primary transition-colors" data-i18n="nav.userscript">油猴脚本</a>
|
<a href="userscript/gemini-watermark-remover.user.js" target="_blank" class="hidden md:inline-block hover:text-primary transition-colors" data-i18n="nav.userscript">油猴脚本</a>
|
||||||
<a href="https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f" target="_blank" class="hidden md:inline-block hover:text-primary transition-colors" data-i18n="nav.principle">去水印原理</a>
|
<a href="https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f" target="_blank" rel="noopener noreferrer" class="hidden md:inline-block hover:text-primary transition-colors" data-i18n="nav.principle">去水印原理</a>
|
||||||
<a href="https://github.com/journey-ad/gemini-watermark-remover" target="_blank" class="hover:text-primary transition-colors">GitHub</a>
|
<a href="https://github.com/journey-ad/gemini-watermark-remover" target="_blank" rel="noopener noreferrer" class="hover:text-primary transition-colors">GitHub</a>
|
||||||
<button id="langSwitch" class="px-3 py-1 text-nowrap border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">EN</button>
|
<button id="langSwitch" class="px-3 py-1 text-nowrap border border-gray-300 rounded-lg hover:bg-gray-50 transition-colors">EN</button>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -241,8 +241,8 @@
|
||||||
|
|
||||||
<footer class="bg-emerald-600 text-white py-6 md:pt-12 md:pb-8">
|
<footer class="bg-emerald-600 text-white py-6 md:pt-12 md:pb-8">
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-4 md:gap-8 mb-8">
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-8 mb-8">
|
||||||
<div class="col-span-1 md:col-span-2">
|
<div class="col-span-1 sm:col-span-2 lg:col-span-2">
|
||||||
<h5 class="text-2xl font-bold mb-4" data-i18n="header.title">Gemini Watermark Remover</h5>
|
<h5 class="text-2xl font-bold mb-4" data-i18n="header.title">Gemini Watermark Remover</h5>
|
||||||
<p class="text-emerald-100 text-sm max-w-sm" data-i18n="footer.desc">
|
<p class="text-emerald-100 text-sm max-w-sm" data-i18n="footer.desc">
|
||||||
Gemini 无损去水印工具,本工具仅供学习交流使用
|
Gemini 无损去水印工具,本工具仅供学习交流使用
|
||||||
|
|
@ -251,20 +251,20 @@
|
||||||
<div>
|
<div>
|
||||||
<h6 class="font-bold mb-2 md:mb-4 text-emerald-100" data-i18n="footer.links">链接</h6>
|
<h6 class="font-bold mb-2 md:mb-4 text-emerald-100" data-i18n="footer.links">链接</h6>
|
||||||
<ul class="space-y-1 md:space-y-2 text-sm text-emerald-50">
|
<ul class="space-y-1 md:space-y-2 text-sm text-emerald-50">
|
||||||
<li><a href="/terms.html" class="hover:text-white" data-i18n="footer.terms">使用条款</a></li>
|
<li><a href="terms.html" class="hover:text-white" data-i18n="footer.terms">使用条款</a></li>
|
||||||
<li><a href="https://github.com/journey-ad/gemini-watermark-remover" target="_blank" class="hover:text-white">Github</a></li>
|
<li><a href="https://github.com/journey-ad/gemini-watermark-remover" target="_blank" rel="noopener noreferrer" class="hover:text-white" data-i18n="footer.github">Github</a></li>
|
||||||
<li><a href="/userscript/gemini-watermark-remover.user.js" target="_blank" class="hover:text-white" data-i18n="nav.userscript">油猴脚本</a></li>
|
<li><a href="userscript/gemini-watermark-remover.user.js" target="_blank" class="hover:text-white" data-i18n="nav.userscript">油猴脚本</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6 class="font-bold mb-2 md:mb-4 text-emerald-100" data-i18n="footer.tech">技术</h6>
|
<h6 class="font-bold mb-2 md:mb-4 text-emerald-100" data-i18n="footer.tech">技术</h6>
|
||||||
<ul class="space-y-1 md:space-y-2 text-sm text-emerald-50">
|
<ul class="space-y-1 md:space-y-2 text-sm text-emerald-50">
|
||||||
<li><a href="https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f" target="_blank" class="hover:text-white" data-i18n="nav.principle">去水印原理</a></li>
|
<li><a href="https://allenkuo.medium.com/removing-gemini-ai-watermarks-a-deep-dive-into-reverse-alpha-blending-bbbd83af2a3f" target="_blank" rel="noopener noreferrer" class="hover:text-white" data-i18n="nav.principle">去水印原理</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="border-t border-emerald-500 pt-8 text-center text-sm text-emerald-200">
|
<div class="border-t border-emerald-500 pt-8 text-center text-sm text-emerald-200">
|
||||||
<p data-i18n="footer.copyright">© 2025 Gemini Watermark Remover. All rights reserved.</p>
|
<p data-i18n="footer.copyright">© Gemini Watermark Remover. All rights reserved.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
<path d="m12 3-1.9 5.8-5.8 1.9 5.8 1.9 1.9 5.8 1.9-5.8 5.8-1.9-5.8-1.9Z"></path>
|
<path d="m12 3-1.9 5.8-5.8 1.9 5.8 1.9 1.9 5.8 1.9-5.8 5.8-1.9-5.8-1.9Z"></path>
|
||||||
</svg>
|
</svg>
|
||||||
<h1 class="text-sm font-bold tracking-tight text-primary md:text-xl">
|
<h1 class="text-sm font-bold tracking-tight text-primary md:text-xl">
|
||||||
<a href="/" class="hover:text-primary transition-colors" title="Gemini Watermark Remover">Gemini <span class="text-gray-700 font-medium">Watermark Remover</span></a>
|
<a href="./" class="hover:text-primary transition-colors" title="Gemini Watermark Remover">Gemini <span class="text-gray-700 font-medium">Watermark Remover</span></a>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -129,10 +129,13 @@
|
||||||
<footer class="bg-emerald-600 text-white pt-12 pb-8 mt-auto">
|
<footer class="bg-emerald-600 text-white pt-12 pb-8 mt-auto">
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<div class="text-center text-sm text-emerald-200">
|
<div class="text-center text-sm text-emerald-200">
|
||||||
<p>© 2025 Gemini Watermark Remover. All rights reserved.</p>
|
<p>© <span id="year">2025</span> Gemini Watermark Remover. All rights reserved.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
<script>
|
||||||
|
document.getElementById('year').textContent = new Date().getFullYear();
|
||||||
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -9,14 +9,18 @@ const i18n = {
|
||||||
},
|
},
|
||||||
|
|
||||||
async loadTranslations(locale) {
|
async loadTranslations(locale) {
|
||||||
const res = await fetch(`/i18n/${locale}.json?_=${Date.now()}`);
|
const res = await fetch(`./i18n/${locale}.json?_=${Date.now()}`);
|
||||||
this.translations = await res.json();
|
this.translations = await res.json();
|
||||||
this.locale = locale;
|
this.locale = locale;
|
||||||
localStorage.setItem('locale', locale);
|
localStorage.setItem('locale', locale);
|
||||||
},
|
},
|
||||||
|
|
||||||
t(key) {
|
t(key) {
|
||||||
return this.translations[key] || key;
|
let text = this.translations[key] || key;
|
||||||
|
if (typeof text === 'string') {
|
||||||
|
text = text.replace('{{year}}', new Date().getFullYear());
|
||||||
|
}
|
||||||
|
return text;
|
||||||
},
|
},
|
||||||
|
|
||||||
applyTranslations() {
|
applyTranslations() {
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,9 @@
|
||||||
"footer.desc": "Gemini Watermark Remover, for educational purposes only",
|
"footer.desc": "Gemini Watermark Remover, for educational purposes only",
|
||||||
"footer.links": "Links",
|
"footer.links": "Links",
|
||||||
"footer.terms": "Terms of Use",
|
"footer.terms": "Terms of Use",
|
||||||
|
"footer.github": "GitHub",
|
||||||
"footer.tech": "Technology",
|
"footer.tech": "Technology",
|
||||||
"footer.copyright": "© 2025 Gemini Watermark Remover. All rights reserved.",
|
"footer.copyright": "© {{year}} Gemini Watermark Remover. All rights reserved.",
|
||||||
"loading.text": "Processing...",
|
"loading.text": "Processing...",
|
||||||
"status.loading": "Loading resources...",
|
"status.loading": "Loading resources...",
|
||||||
"status.pending": "Pending...",
|
"status.pending": "Pending...",
|
||||||
|
|
|
||||||
|
|
@ -27,8 +27,9 @@
|
||||||
"footer.desc": "Gemini 无损去水印工具,本工具仅供学习交流使用",
|
"footer.desc": "Gemini 无损去水印工具,本工具仅供学习交流使用",
|
||||||
"footer.links": "链接",
|
"footer.links": "链接",
|
||||||
"footer.terms": "使用条款",
|
"footer.terms": "使用条款",
|
||||||
|
"footer.github": "GitHub",
|
||||||
"footer.tech": "技术",
|
"footer.tech": "技术",
|
||||||
"footer.copyright": "© 2025 Gemini Watermark Remover. All rights reserved.",
|
"footer.copyright": "© {{year}} Gemini Watermark Remover. All rights reserved.",
|
||||||
"loading.text": "正在处理...",
|
"loading.text": "正在处理...",
|
||||||
"status.loading": "正在加载资源...",
|
"status.loading": "正在加载资源...",
|
||||||
"status.pending": "等待处理...",
|
"status.pending": "等待处理...",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue