New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
www.nhk.or.jp - desktop site instead of mobile site #959
Comments
In http://www.nhk.or.jp/topmenu/1403_js/20150326/onlinetop.js: if( g_ua.SmartPhone ){//UAがスマホ
if(nol.data.smp==undefined||nol.data.smp=='1'){
location.href='http://www.nhk.or.jp/sp/';
}
document.write('<p class="smInfo"><a id="h26" class="beacon" href="#" onclick="return chgSmaphoMode(1);">スマートフォン版はこちら</a></p>');
}
function chgSmaphoMode(md){
nol.data.smp=md;
nol.save();
location.href='http://www.nhk.or.jp/sp/';
return false;
}
//browser
var g_ua=(function(){
var o={};
var ua=navigator.userAgent;
var apn=navigator.appName;
var apv=navigator.appVersion;
o.Win9X = (apv.search(/windows 98/i)>-1);
o.IE = (apn.search(/internet explorer/i)>-1);
o.Opera = (ua.search(/opera/i)>-1);
if(o.Opera)o.IE=false;
o.Safari = (apv.search(/safari/i)>-1);
o.iPhone = (apv.search(/iphone/i)>-1);
o.iPod = (apv.search(/ipod/i)>-1);
o.iPad = (apv.search(/ipad/i)>-1);
o.Android = (apv.search(/android/i)>-1);
o.BlackBerry = (ua.search(/blackberry/i)>-1);
o.SmartPhone = (ua.search(/webkit/i)>-1&&ua.search(/mobile/i)>-1);
if(o.iPad)o.SmartPhone=false;
o.iev=-1;
if(o.IE){
var re=new RegExp('MSIE ([0-9]{1,}[\.0-9]{0,})');
if(re.exec(ua)!=null)o.iev=parseFloat(RegExp.$1);
}
return o;
})(); So there's clientside code here controlling the redirect to the smartphone site. The minimal UA token needed to get here is "webkit". We should recommend they send anyone that matches on o.SmartPhone = (ua.search(/mobile/i)>-1;
if(o.iPad)o.SmartPhone=false; |
And #950 ;) |
Mozilla Japan has contact, will contact them. |
For the status, if I understood, As of today, NHK is not interested in fixing the site. Their target is Safari and Chrome. Mozilla could fix the issue that doing UA override, so Firefox users can access the site. Then the issues will be the one shown in #951 which also could be fixed on Firefox side through Unprefixing service. So we might want to add this site to the whitelist. |
FYI, NHK is working on their new mobile website and you can try it out here www.nhk.or.jp/sp/top-trial/ just tested with Firefox Mobile (Beta) on my Nexus 5 it looks fine (no rendering issues). |
The trial page given by @myakura is now dead. It proposes a couple of links. which are the major entry points on NHK site. http://www.nhk.or.jp/ is still sending the desktop site to Firefox on Android. When faking Chrome UA, we get And when we add |
@miketaylr given that they don't want to move their finger, maybe UA override. |
Just a side note that
|
OK, once we ship |
Linking to Go Faster addon for UA override. |
This issue is no longer reproducible. Verified on:
Tested with: |
URL: http://www.nhk.or.jp
Browser / Version: Firefox Mobile 40.0
Operating System: Android
Problem type: Desktop site instead of mobile site
Steps to Reproduce
Expected Behavior: redirected to smartphone site
Actual Behavior: stuck on desktop site
country: jp
The text was updated successfully, but these errors were encountered: