Closed Bug 531766 Opened 15 years ago Closed 11 years ago

Download button JS needs to be refactored into an existing js file

Categories

(Camino Graveyard :: Product Site, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: alqahira, Assigned: ss)

Details

The code that selects the correct URL for the Download button has a couple of problems:

1) It exists as separate inline js on at least two pages (Home and Features)
2) The version number is hard-coded in the URL string

The code needs to be pulled out of the pages and stuck in a common JS file.  It also needs to be refactored to pull the current version number from somewhere else so it's not *one more thing* to have to change each time.  (ua-messages.js already has a widely-used variable for current version.)

I think I'd like to see this js pulled into ua-detect for the detection and ua-messages for the button url writing (since both are currently included by all pages already).
Flags: camino2.0.1?
I wouldn't block 2.0.1 on this, but I'll put it high-ish on my list and try and get to it this week.
Flags: camino2.0.1? → camino2.0.1-
Features also includes a hard-coded version number in the default/non-js button's URL (Home, mercifully, doesn't).  

Maybe these buttons (and other download links on the site) want htaccess rules and dummy URLs like download/latest/ and download/latest-MultiLang/ ?  I suppose that would also help with spidering?
(In reply to comment #2)
> (and other download links on the site)

Such as the buttons on Downloads.
(In reply to comment #2)
> Features also includes a hard-coded version number in the default/non-js
> button's URL (Home, mercifully, doesn't).  

This wasn't supposed to be. The JS rewriting we do should be sufficient here. I failed in my copy-paste, likely.

> Maybe these buttons (and other download links on the site) want htaccess rules
> and dummy URLs like download/latest/ and download/latest-MultiLang/ ?  I
> suppose that would also help with spidering?

Naw, we're good. I just need to call the JS file that we already include that has this data. We're doing that now on home and features, but the JS is still inline. Working on that.
Assignee: samuel.sidler+old → samuel.sidler
Summary: Download button JS needs to be refactored and unified → Download button JS needs to be refactored into an existing js file
We might also want to take advantage of latestReleaseOS (bug 609090) here.
Given the current state of the Camino project, we won't be fixing these website bugs. Mass changing our Product Site bugs (search on "camino-website-bugs").

RESOLVED -> WONTFIX.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.