From 0ee3ef3b5beb784b2cb28317a71cdd1e765c5a3a Mon Sep 17 00:00:00 2001 From: LaoWang <257199637@qq.com> Date: Tue, 2 Jun 2026 14:03:31 +0000 Subject: [PATCH] =?UTF-8?q?refactor:=20=E8=AF=91=E6=96=87=E5=A4=8D?= =?UTF-8?q?=E7=94=A8openPdfBtn,=20=E5=88=A0openTrans,=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/app.js | 9 +-------- static/index.html | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/static/app.js b/static/app.js index ff0f0fd..9d9eb2f 100644 --- a/static/app.js +++ b/static/app.js @@ -157,7 +157,7 @@ function renderPaper(p) { // Show translation button for ALL papers with arxiv or pdf const paperId = p.arxiv || (p.pdf ? p.pdf.split('/').pop().replace('.pdf','') : null); if (paperId) { - links.push(''); + links.push(''); } return `
${p.year||'β€”'}
${p.title}
@@ -174,13 +174,6 @@ function getPdfLink(p) { function openPdfBtn(btn) { openPdf(btn.dataset.pdf, btn.dataset.title); } -function openTrans(btn) { - const url = btn.dataset.pdf; - const title = btn.dataset.title; - openPdf(url, title); - // If translation doesn't exist, the iframe will show error - user can see it -} - // ═══════════════ PDF VIEWER (ηŠΆζ€ζ‘ι©±εŠ¨) ═══════════════ function getLocalPdfUrl(extUrl) { const am = extUrl.match(/arxiv\.org\/pdf\/(\d+\.\d+)/); diff --git a/static/index.html b/static/index.html index a4c8337..881e3b7 100644 --- a/static/index.html +++ b/static/index.html @@ -190,7 +190,7 @@ function renderPaper(p) { // Show translation button for ALL papers with arxiv or pdf const paperId = p.arxiv || (p.pdf ? p.pdf.split('/').pop().replace('.pdf','') : null); if (paperId) { - links.push(''); + links.push(''); } return `
${p.year||'β€”'}
${p.title}
@@ -207,13 +207,6 @@ function getPdfLink(p) { function openPdfBtn(btn) { openPdf(btn.dataset.pdf, btn.dataset.title); } -function openTrans(btn) { - const url = btn.dataset.pdf; - const title = btn.dataset.title; - openPdf(url, title); - // If translation doesn't exist, the iframe will show error - user can see it -} - // ═══════════════ PDF VIEWER (ηŠΆζ€ζ‘ι©±εŠ¨) ═══════════════ function getLocalPdfUrl(extUrl) { const am = extUrl.match(/arxiv\.org\/pdf\/(\d+\.\d+)/);