Browse files

Consider Android devices as mobile user agents

  • Loading branch information...
1 parent 9c1eb27 commit 944aea69987d6ee4bfee20a2b1f636ef7733efcb @marcuswestin committed Sep 8, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 Changelog
  2. +1 −1 server.js
View
1 Changelog
@@ -3,6 +3,7 @@ TODO
intended v0.4.7
+ Remove default port and host - just use what the current page uses by default
++ Treat Android devices as mobile, with regards to loading resources in one big response rather than individual requests
v0.4.6
+ Add server.setOpts and server.handleRequest
View
2 server.js
@@ -100,7 +100,7 @@ function _handleMainModuleRequest(reqPath, req, res) {
var response = ['__require__ = {}']
var userAgent = req.headers['user-agent'],
- isMobile = userAgent.match('iPad') || userAgent.match('iPod') || userAgent.match('iPhone'),
+ isMobile = userAgent.match('iPad') || userAgent.match('iPod') || userAgent.match('iPhone') || userAgent.match('Android'),
isSafari = !isMobile && userAgent.match('Safari') && !userAgent.match('Chrome')
if (isMobile) {

0 comments on commit 944aea6

Please sign in to comment.