Closed Bug 786195 Opened 12 years ago Closed 12 years ago

Refactor JS function to detect Firefox version

Categories

(www.mozilla.org :: Pages & Content, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rik, Assigned: aiishwarya.sivaraman)

Details

(Whiteboard: [good first bug][mentor=anthony@ricaud.me])

Attachments

(1 file, 2 obsolete files)

We're using similar code on a couple of pages to detect if the visitor is on the latest version or not, we should factorise that. From a quick search, there is at least those pages: /firefox/speed /firefox/update /firefox/fx
Hi, I am Aish I would like to work on this bug. Could you assign it to me?
Assigning to Aish. To be clearer, the examples I posted are the URLs of some pages that query that info. I think a good way to collect all usage is to check for navigator.userAgent.
Assignee: nobody → aiishwarya.sivaraman
Attached file Patch (obsolete) —
Attachment #661500 - Flags: feedback?
Attachment #661500 - Flags: feedback? → feedback?(anthony)
Attachment #661500 - Flags: feedback?(anthony) → review?(anthony)
Comment on attachment 661500 [details] Patch I'm very sorry for the slow review. The function only returns the main version number, can you rename the function to getFirefoxMasterVersion to make it clear to anyone using it?
Attachment #661500 - Flags: review?(anthony) → review-
Attachment #661500 - Attachment is obsolete: true
Attachment #678334 - Flags: review?(anthony)
Comment on attachment 678334 [details] [diff] [review] Updated Patch - Changed the name of the function detecting the firefox version Review of attachment 678334 [details] [diff] [review]: ----------------------------------------------------------------- I should have mentioned it earlier: if you change the function name, please change the name everywhere it is currently used.
Attachment #678334 - Flags: review?(anthony) → review-
Apologies for the error. I have made the required changes.
Attachment #678334 - Attachment is obsolete: true
Attachment #678396 - Flags: review?(anthony)
Comment on attachment 678396 [details] [diff] [review] Patch - Updated : Changed the function names Review of attachment 678396 [details] [diff] [review]: ----------------------------------------------------------------- r+ thanks! I somehow typo-ed the name of the function. getFirefoxMajorVersion makes more sense than MasterVersion so I'll commit this with the name changed.
Attachment #678396 - Flags: review?(anthony) → review+
Oh actually, could you submit a pull request against https://github.com/mozilla/bedrock/ so that I can credit you properly with the commit?
I finally committed it with your Bugzilla info. Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
This has been pushed to production.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: