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)
www.mozilla.org
Pages & Content
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)
4.97 KB,
patch
|
rik
:
review+
|
Details | Diff | Splinter Review |
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?
Reporter | ||
Comment 2•12 years ago
|
||
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
Attachment #661500 -
Flags: feedback?
Updated•12 years ago
|
Attachment #661500 -
Flags: feedback? → feedback?(anthony)
Reporter | ||
Updated•12 years ago
|
Attachment #661500 -
Flags: feedback?(anthony) → review?(anthony)
Reporter | ||
Comment 4•12 years ago
|
||
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)
Reporter | ||
Comment 6•12 years ago
|
||
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)
Reporter | ||
Comment 8•12 years ago
|
||
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+
Reporter | ||
Comment 9•12 years ago
|
||
Oh actually, could you submit a pull request against https://github.com/mozilla/bedrock/ so that I can credit you properly with the commit?
Comment 10•12 years ago
|
||
Commit pushed to master at https://github.com/mozilla/bedrock
https://github.com/mozilla/bedrock/commit/dffcebb84c5c928f0c791ab827d7cd36e920be6e
Refactor JS function to detect Firefox version
fix bug 786195
Reporter | ||
Comment 11•12 years ago
|
||
I finally committed it with your Bugzilla info.
Thanks!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 12•12 years ago
|
||
This has been pushed to production.
Comment 13•12 years ago
|
||
verified fixed http://www.mozilla.org/en-US/firefox/speed/
http://www.mozilla.org/en-US/firefox/update/
http://www.mozilla.org/en-US/firefox/fx/
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•