diff options
author | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-20 09:38:18 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2009-11-20 09:38:18 -0800 |
commit | 91ed9bbbdce1990782b4ac86650f9c79bb94d961 (patch) | |
tree | e01fb6b6d7cb57cf76f0bed3cfa606a40f27313f /tools/droiddoc/templates/assets | |
parent | d920ec8354940653e6cf53a1540360cca3bcc5f7 (diff) | |
parent | d8115ffb2251b76c099d3b6807f0affd838b4788 (diff) | |
download | build-91ed9bbbdce1990782b4ac86650f9c79bb94d961.zip build-91ed9bbbdce1990782b4ac86650f9c79bb94d961.tar.gz build-91ed9bbbdce1990782b4ac86650f9c79bb94d961.tar.bz2 |
Merge change Id8115ffb into eclair-sdk
* changes:
docs: revise user agent detection to use lower case for string comparisons and add 'webos' as a mobile device
Diffstat (limited to 'tools/droiddoc/templates/assets')
-rw-r--r-- | tools/droiddoc/templates/assets/android-developer-docs.js | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/droiddoc/templates/assets/android-developer-docs.js b/tools/droiddoc/templates/assets/android-developer-docs.js index 6431163..8843f9a 100644 --- a/tools/droiddoc/templates/assets/android-developer-docs.js +++ b/tools/droiddoc/templates/assets/android-developer-docs.js @@ -24,15 +24,16 @@ function addLoadEvent(newfun) { } } -var agent = navigator['userAgent']; +var agent = navigator['userAgent'].toLowerCase(); // If a mobile phone, set flag and do mobile setup -if ((agent.indexOf("Mobile") != -1) || - (agent.indexOf("BlackBerry") != -1) || - (agent.indexOf("Mini") != -1)) { +if ((agent.indexOf("mobile") != -1) || // android, iphone, ipod + (agent.indexOf("blackberry") != -1) || + (agent.indexOf("webos") != -1) || + (agent.indexOf("mini") != -1)) { // opera mini browsers isMobile = true; addLoadEvent(mobileSetup); // If not a mobile browser, set the onresize event for IE6, and others -} else if (agent.indexOf("MSIE 6.0") != -1) { +} else if (agent.indexOf("msie 6") != -1) { isIE6 = true; addLoadEvent(function() { window.onresize = resizeAll; |