${p.title}
@@ -175,6 +174,15 @@ function getPdfLink(p) {
function openPdfBtn(btn) { openPdf(btn.dataset.pdf, btn.dataset.title); }
+async function openTrans(btn) {
+ const url = btn.dataset.pdf;
+ try {
+ const resp = await fetch(url, { method: 'HEAD' });
+ if (resp.ok) { openPdf(url, btn.dataset.title); return; }
+ } catch(e) {}
+ alert('诼莺ćčŻćĺ°ćŞçćďźčݎç¨ĺĺčŻ');
+}
+
// âââââââââââââââ 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 da257ae..0e6a2e4 100644
--- a/static/index.html
+++ b/static/index.html
@@ -190,8 +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) {
- const transUrl = `/papers/translated/${paperId}.pdf`;
- links.push(`
`);
+ links.push('
');
}
return `
${p.year||'â'}
${p.title}
@@ -208,6 +207,15 @@ function getPdfLink(p) {
function openPdfBtn(btn) { openPdf(btn.dataset.pdf, btn.dataset.title); }
+async function openTrans(btn) {
+ const url = btn.dataset.pdf;
+ try {
+ const resp = await fetch(url, { method: 'HEAD' });
+ if (resp.ok) { openPdf(url, btn.dataset.title); return; }
+ } catch(e) {}
+ alert('诼莺ćčŻćĺ°ćŞçćďźčݎç¨ĺĺčŻ');
+}
+
// âââââââââââââââ PDF VIEWER (çśććĄéŠąĺ¨) âââââââââââââââ
function getLocalPdfUrl(extUrl) {
const am = extUrl.match(/arxiv\.org\/pdf\/(\d+\.\d+)/);