Skip to content

Commit 89a4dbc

Browse files
linhayclaude
andcommitted
fix: use direct download URL for DMG assets
Use github.com/releases/download/tag/filename format which triggers immediate file download without page redirect. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent f497e8d commit 89a4dbc

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

docs/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -555,14 +555,17 @@ <h2 style="margin-bottom: 14px;">
555555
}
556556
if (release && release.tag_name) {
557557
document.getElementById('version-badge').textContent = release.tag_name;
558-
// Set direct download links from release assets
558+
// Set direct download links (releases/download/ triggers direct file download)
559559
if (release.assets) {
560+
const tag = release.tag_name;
560561
for (const asset of release.assets) {
561562
const name = asset.name.toLowerCase();
562563
if (name.includes('applesilicon') && name.endsWith('.dmg')) {
563-
document.getElementById('dl-mac-arm64').href = asset.browser_download_url;
564+
document.getElementById('dl-mac-arm64').href =
565+
`https://github.com/AxApp/GetTokens/releases/download/${tag}/${asset.name}`;
564566
} else if (name.includes('intel') && name.endsWith('.dmg')) {
565-
document.getElementById('dl-mac-x64').href = asset.browser_download_url;
567+
document.getElementById('dl-mac-x64').href =
568+
`https://github.com/AxApp/GetTokens/releases/download/${tag}/${asset.name}`;
566569
}
567570
}
568571
}

0 commit comments

Comments
 (0)