From 439165bc6c6261398c908fd8fcdf9d8c122f12e2 Mon Sep 17 00:00:00 2001 From: snaily Date: Sun, 13 Apr 2025 01:08:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=20auth.js=20?= =?UTF-8?q?=E5=B9=B6=E4=BF=AE=E5=A4=8D=20error=5Flogs.html=20=E8=84=9A?= =?UTF-8?q?=E6=9C=AC=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除了不再使用的 `app/static/js/auth.js` 文件。 - 修正了 `app/templates/error_logs.html` 中 `error_logs.js` 的脚本引用路径,移除了 `url_for` 函数调用,直接使用静态路径。 --- app/static/js/auth.js | 18 ------------------ app/templates/error_logs.html | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 app/static/js/auth.js diff --git a/app/static/js/auth.js b/app/static/js/auth.js deleted file mode 100644 index bad01ab..0000000 --- a/app/static/js/auth.js +++ /dev/null @@ -1,18 +0,0 @@ -if ('serviceWorker' in navigator) { - window.addEventListener('load', () => { - navigator.serviceWorker.register('/static/service-worker.js') - .then(registration => { - console.log('ServiceWorker注册成功:', registration.scope); - }) - .catch(error => { - console.log('ServiceWorker注册失败:', error); - }); - }); -} - -document.addEventListener('DOMContentLoaded', () => { - const copyrightYear = document.querySelector('.copyright script'); - if (copyrightYear) { - copyrightYear.textContent = new Date().getFullYear(); - } -}); diff --git a/app/templates/error_logs.html b/app/templates/error_logs.html index 2b80c98..0a5334f 100644 --- a/app/templates/error_logs.html +++ b/app/templates/error_logs.html @@ -233,7 +233,7 @@ {% endblock %} {% block body_scripts %} - +