Closed
Bug 960826
Opened 12 years ago
Closed 7 years ago
gnavi.co.jp sends desktop site to Firefox OS
Categories
(Web Compatibility :: Site Reports, defect, P5)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: hsteen, Unassigned, Mentored)
References
()
Details
(Whiteboard: [clientsniff] [country-jp] [contactready] )
Attachments
(1 file)
140.32 KB,
image/png
|
Details |
http://x.gnst.jp/md/md.js
function md(t,q){var u=navigator.userAgent;if(t=='pc'){if(((/android/i.test(u) && /mobile/i.test(u)) || (!/ipad/i.test(u) && /ip(hone|od)/i.test(u))) && !(/smp_pcview/.test(document.cookie))){location.replace(q || 'http://mobile.gnavi.co.jp/iphone/top/');}}else if(t == 's'){if(!(/android/i.test(u) && /mobile/i.test(u)) && ( /ipad/i.test(u) || !/ip(hone|od)/i.test(u))) {location.replace(q || 'http://www.gnavi.co.jp/');}}}
![]() |
||
Comment 1•11 years ago
|
||
They could improve Web compatibility and simplify at the same time:
function md(t, q) {
var u = navigator.userAgent.toLowerCase();
if (t == 'pc') {
if ((
// testing for mobile devices
(/mobile/i.test(u) ||
/android/i.test(u) ||
/blackberry/i.test(u))
&&
// removing tablets
!(/ipad/i.test(u) ||
/tablet/i.test(u))
) && !(/smp_pcview/.test(document.cookie))) {
location.replace(q || 'http://mobile.gnavi.co.jp/iphone/top/');
}
} else if (t == 's') {
if (/ipad/i.test(u) || /tablet/i.test(u)) {
location.replace(q || 'http://www.gnavi.co.jp/');
}
}
}
It's not fool proof but it's better for the redirection part.
There will be other issues which affects Firefox Android and Firefox OS. I will open a separate bug.
Whiteboard: [clientsniff] [country-jp] [contactready] → [clientsniff] [country-jp] [contactready] [mentor=kdubost]
Updated•11 years ago
|
Mentor: kdubost
Whiteboard: [clientsniff] [country-jp] [contactready] [mentor=kdubost] → [clientsniff] [country-jp] [contactready]
![]() |
||
Updated•9 years ago
|
Priority: -- → P5
Comment 2•7 years ago
|
||
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Assignee | ||
Updated•7 years ago
|
Product: Tech Evangelism → Web Compatibility
Assignee | ||
Updated•1 years ago
|
Component: Mobile → Site Reports
You need to log in
before you can comment on or make changes to this bug.
Description
•