fix: async function openPdf + JS 内联 HTML 修复

- openPdf 改为 async function(修 await 语法错误)
- index.html JS 内联,彻底绕过浏览器缓存问题
- 添加 index_template.html 作为原始模板
This commit is contained in:
2026-06-02 11:04:05 +00:00
parent 37039a4eaa
commit d5ba6f2847
3 changed files with 36 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ function getLocalPdfUrl(extUrl) {
return null; return null;
} }
function openPdf(url, title) { async function openPdf(url, title) {
const decodedUrl = decodeURIComponent(url); const decodedUrl = decodeURIComponent(url);
const decodedTitle = decodeURIComponent(title); const decodedTitle = decodeURIComponent(title);
currentPdf = decodedUrl; currentPdf = decodedUrl;

View File

@@ -206,7 +206,7 @@ function getLocalPdfUrl(extUrl) {
return null; return null;
} }
function openPdf(url, title) { async function openPdf(url, title) {
const decodedUrl = decodeURIComponent(url); const decodedUrl = decodeURIComponent(url);
const decodedTitle = decodeURIComponent(title); const decodedTitle = decodeURIComponent(title);
currentPdf = decodedUrl; currentPdf = decodedUrl;

View File

@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>LLM 论文图书馆</title>
<link rel="stylesheet" href="/style.css">
</head>
<body>
<div class="header">
<h1>🧠 LLM 论文图书馆</h1>
</div>
<div class="search-wrap">
<span class="search-icon">🔍</span>
<input class="search-input" placeholder="搜索论文标题、作者、关键词..." autocomplete="off">
</div>
<div class="grid" id="moduleGrid"></div>
<div class="overlay" id="overlay">
<div class="modal" id="modal">
<button class="modal-close" id="modalClose">&times;</button>
<div class="modal-title" id="modalTitle"></div>
<div class="modal-subtitle" id="modalSubtitle"></div>
<div class="tabs" id="modalTabs"></div>
<div id="modalContent"></div>
</div>
</div>
<script src="/app.js"></script>
</body>
</html>