Skip to content

Commit

Permalink
Consider Android devices as mobile user agents
Browse files Browse the repository at this point in the history
  • Loading branch information
marcuswestin committed Sep 8, 2011
1 parent 9c1eb27 commit 944aea6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server.js
Expand Up @@ -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) {
Expand Down

0 comments on commit 944aea6

Please sign in to comment.