diff --git a/code/smartphone.js b/code/smartphone.js index 37c89a4a..8cd4ad02 100644 --- a/code/smartphone.js +++ b/code/smartphone.js @@ -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/); }