allow forcing of mobile/desktop site with vp=m or vp=f URL parameters
this will allow the IITC Mobile app to include an option to choose desktop/mobile versions of IITC for regular desktop browsers, don't expect it to work well with vp=m
This commit is contained in:
parent
432974f6fa
commit
51804c80dd
@ -2,6 +2,15 @@ window.isSmartphone = function() {
|
||||
// this check is also used in main.js. Note it should not detect
|
||||
// tablets because their display is large enough to use the desktop
|
||||
// version.
|
||||
|
||||
// The stock intel site allows forcing mobile/full sites with a vp=m or vp=f
|
||||
// parameter - let's support the same. (stock only allows this for some
|
||||
// browsers - e.g. android phone/tablet. let's allow it for all, but
|
||||
// no promises it'll work right)
|
||||
var viewParam = getURLParam('vp');
|
||||
if (viewParam == 'm') return true;
|
||||
if (viewParam == 'f') return false;
|
||||
|
||||
return navigator.userAgent.match(/Android.*Mobile/);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user