From d2865db19084db357b9bfde9dc180509ead08db9 Mon Sep 17 00:00:00 2001 From: nelsoduarte Date: Sun, 10 May 2026 22:58:22 +0100 Subject: [PATCH] fix(website): hero CTA always goes to the download page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The hero "Download for free" button had its href rewritten on load by a userAgent sniff in script.js, which forced a direct platform download (Windows .exe / macOS .zip / Linux .tar.gz). This was misleading because: - The app is multi-platform; we now also ship on the Microsoft Store (the most appropriate Windows install path), not just GitHub Releases. - The macOS branch still pointed at PDFApps-macOS.zip, which no longer exists — we ship a .dmg as of v1.13.4. - Forcing a download bypasses the dedicated download page where users can see all install options (Store, .exe, DMG, Snap, Copr, AUR, AppImage, ...). Removing the override lets the HTML href="download.html" take effect on every platform, surfacing the curated install options instead of guessing the user's OS. Co-Authored-By: Claude Opus 4.7 (1M context) --- docs/script.js | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/script.js b/docs/script.js index 046db4f..2c1f419 100644 --- a/docs/script.js +++ b/docs/script.js @@ -56,22 +56,6 @@ }); } - // OS-detecting download button - var heroDl = document.getElementById('hero-download'); - if (heroDl) { - var ua = navigator.userAgent; - if (/Mac/i.test(ua)) { - heroDl.textContent = 'Download for macOS'; - heroDl.href = 'https://github.com/nelsonduarte/PDFApps/releases/latest/download/PDFApps-macOS.zip'; - } else if (/Linux/i.test(ua)) { - heroDl.textContent = 'Download for Linux'; - heroDl.href = 'https://github.com/nelsonduarte/PDFApps/releases/latest/download/PDFApps-Linux.tar.gz'; - } else { - heroDl.textContent = 'Download for Windows'; - heroDl.href = 'https://github.com/nelsonduarte/PDFApps/releases/latest/download/PDFAppsSetup.exe'; - } - } - // Scroll-reveal animations var reveals = document.querySelectorAll('.reveal'); if (reveals.length && 'IntersectionObserver' in window) {