LunaTranslator/docs/download.html
恍兮惚兮 1633a7c82b doc
2024-07-03 17:25:07 +08:00

25 lines
961 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>Download LunaTranslator</title>
</head>
<body>
<p id="download-link">Loading...</p>
<script>
fetch('https://api.github.com/repos/HIllya51/LunaTranslator/releases/latest')
.then(response => response.json())
.then(data => {
const asset = data.assets.find(asset => asset.name === 'LunaTranslator.zip');
const asset2 = data.assets.find(asset => asset.name === 'LunaTranslator_x86.zip');
const downloadLink = document.getElementById('download-link');
downloadLink.innerHTML = `<a href="${asset.browser_download_url}">LunaTranslator.zip(64bit)</a><br><a href="${asset2.browser_download_url}">LunaTranslator_x86.zip(32bit)</a>`;
})
.catch(error => {
console.error('Error:', error);
const downloadLink = document.getElementById('download-link');
downloadLink.innerHTML = 'Failed to load download link.';
});
</script>
</body>
</html>