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)

All
Gonk (Firefox OS)
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: hsteen, Unassigned, Mentored)

References

()

Details

(Whiteboard: [clientsniff] [country-jp] [contactready] )

Attachments

(1 file)

Attached image 067.png
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/');}}}
Blocks: 1013080
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]
Mentor: kdubost
Whiteboard: [clientsniff] [country-jp] [contactready] [mentor=kdubost] → [clientsniff] [country-jp] [contactready]
Priority: -- → P5
Closing as we are not working on Firefox OS anymore.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: