Closed
Bug 1457335
Opened 7 years ago
Closed 6 years ago
histography.io - Override UA & navigator.vendor
Categories
(Web Compatibility :: Interventions, enhancement)
Web Compatibility
Interventions
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: adamopenweb, Assigned: denschub)
References
Details
(Whiteboard: [webcompat:sitepatch-applied])
Attachments
(1 file)
(deleted),
patch
|
twisniewski
:
review+
|
Details | Diff | Splinter Review |
Originally filed: https://github.com/webcompat/web-bugs/issues/1804
The site doesn't allow Firefox and contacts have not been successful. It is ranked 285,224 in the U.S, which isn't very high but it would be good for this site to actually work for Firefox users.
Detection code:
var nt = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor),
at = /Safari/.test(navigator.userAgent) && /Apple Computer/.test(navigator.vendor),
it = /Safari/.test(navigator.userAgent) && /Googlebot/.test(navigator.vendor),
rt = {
Android: function() {
return navigator.userAgent.match(/Android/i)
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i)
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i)
},
Opera: function() {
return navigator.userAgent.match(/Opera Mini/i)
},
Windows: function() {
return navigator.userAgent.match(/IEMobile/i)
},
any: function() {
return rt.Android() || rt.BlackBerry() || rt.iOS() || rt.Opera() || rt.Windows()
}
};
rt.any() && (window.location = "mobile.htm"), nt || at || it || (window.location = "browser_support.htm");
Since we do not support navigator.vendor, I'm guessing we'll need to inject JS to override.
Reporter | ||
Updated•7 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
This PR implement a UA override, so Firefox users can enjoy the site as well!
Attachment #8988660 -
Flags: review?(wisniewskit)
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → dschubert
Comment 2•6 years ago
|
||
Comment on attachment 8988660 [details] [diff] [review]
Pull Request #23
Review of attachment 8988660 [details] [diff] [review]:
-----------------------------------------------------------------
r+ (notes on GitHub)
Attachment #8988660 -
Attachment is patch: true
Attachment #8988660 -
Attachment mime type: text/x-github-pull-request → text/plain
Attachment #8988660 -
Flags: review?(wisniewskit) → review+
Assignee | ||
Comment 3•6 years ago
|
||
Site patch is landed in our repo on GitHub, so this can be closed. Landing the site patches (and eventually updating Release users via GoFaster) is tracked in 1481395.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment 4•6 years ago
|
||
FYI The site is broken again even with the user agent override.
See https://webcompat.com/issues/20523 for new diagnosis.
Assignee | ||
Updated•6 years ago
|
Whiteboard: [sitepatch-built]
Assignee | ||
Updated•3 years ago
|
Whiteboard: [sitepatch-built] → [webcompat:sitepatch-applied]
You need to log in
before you can comment on or make changes to this bug.
Description
•