www.01net.com - desktop site instead of mobile site on Firefox OS
URL: http://www.01net.com Browser / Version: Firefox OS Browser / All versions Operating System: Firefox OS Problem type: Desktop site instead of mobile site
Steps to Reproduce Issue initialy declared on Bugzilla@Mozilla : bug 1215727.
- Navigate to: http://www.01net.com
Expected Behavior: The site opens, and is adapted for screen.
Actual Behavior: The site start opening with mobile rendering correctly, but mobile rendering is lost at the end.
This is a responsive Web site which seems to have a trigger on User agent sniffing.
Funny behavior, can reproduce with a desktop window on Blink or Gecko and a small viewport. The design jumps back to desktop.
Probably an issue with this code.
w.prototype = {
constructor: w,
init: function () {
var i = navigator.appVersion;
e.isIE7 = - 1 !== i.indexOf('MSIE 7.'),
e.isIE8 = - 1 !== i.indexOf('MSIE 8.'),
e.isLowIE = e.isIE7 || e.isIE8,
e.isAndroid = /android/gi.test(i),
e.isIOS = /iphone|ipad|ipod/gi.test(i),
e.supportsTransition = I(),
e.probablyMobile = e.isAndroid || e.isIOS || /(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),
n = t(document.body),
o = t(document),
e.popupsCache = {
}
},
Hello,
I tried to find the code you copied previously, without success (right click > view source). I only found this on root site :
<script type="text/javascript">
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iPhone: function() {
return navigator.userAgent.match(/iPhone|iPod/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 (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());
}
};
if (!isMobile.any()){
$(document).ready(function(){
// Delete responsive functions
// We remove all Col-xx and replace by col-xs
for (i = 1 ; i <13; i++){
$(".col-sm-" + i).removeClass("col-sm-" + i);
$(".col-xs-" + i).removeClass("col-xs-" + i);
$(".col-md-" + i).addClass("col-xs-" + i).removeClass("col-md-" + i);
}
// We delete responsive CSS
$('#bfm-responsive').remove();
// Add CSS to force non responsive display
var css_link = $("<link>", {
rel: "stylesheet",
type: "text/css",
href: "http://static.bfmtv.com/ressources/css/bfm-no-responsiveness.css?v1.1.90"
});
css_link.appendTo('head');
});
}
</script>
I find that my current FxOS Browser UA is Mozilla/5.0 (Mobile; rv44.0) Gecko/44.0 Firefox/44.0). Maybe, it's possible to make a workaround for FirefoxOS like that:
FirefoxOS: function() {
return navigator.userAgent.match(/Mobile/i);
},
any: function() {
return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows() || isMobile.FirefoxOS());
}
I found an email in 01net CGU (webmaster at ...), can I try contact them ?
@adamopenweb the issue was already fixed
@techchic Testing with Firefox OS Simulator version 2.0 this issue still appears for me. @micgeri Yes absolutely you can. If you do, please change the status to sitewait. :)
I have contacted them webmaster@