Permalink
Browse files

Changed the list of mobile_user_agents to reduce false positives and …

…added more agents.
  • Loading branch information...
1 parent 9a705c7 commit dc9327bf5796ea6be89f22752fdd49d0b4286a38 @alekseyg alekseyg committed Sep 3, 2009
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/mobile_fu.rb
View
@@ -5,12 +5,13 @@ module MobileFu
# to add on to this list.
- MOBILE_USER_AGENTS = 'palm|palmos|palmsource|iphone|blackberry|nokia|phone|midp|mobi|pda|' +
- 'wap|java|nokia|hand|symbian|chtml|wml|ericsson|lg|audiovox|motorola|' +
- 'samsung|sanyo|sharp|telit|tsm|mobile|mini|windows ce|smartphone|' +
- '240x320|320x320|mobileexplorer|j2me|sgh|portable|sprint|vodafone|' +
- 'docomo|kddi|softbank|pdxgw|j-phone|astel|minimo|plucker|netfront|' +
- 'xiino|mot-v|mot-e|portalmmm|sagem|sie-s|sie-m|android|ipod|pre'
+ # too many false positives: pda|java|lg|sanyo|wap|hand|wml|sharp|tsm|mini
+ # already matched: palmos|palmsource|mobile|mobileexplorer|smartphone|iphone|j-phone|
+ MOBILE_USER_AGENTS = 'palm|blackberry|nokia|phone|midp|mobi|symbian|chtml|ericsson|minimo|' +
+ 'audiovox|motorola|samsung|telit|upg1|windows ce|ucweb|astel|plucker|' +
+ 'x320|x240|j2me|sgh|portable|sprint|docomo|kddi|softbank|android|mmp|' +
+ 'pdxgw|netfront|xiino|vodafone|portalmmm|sagem|mot-|sie-|ipod|up\\.b|' +
+ 'webos|amoi|novarra|cdm|alcatel|pocket'
def self.included(base)
base.extend(ClassMethods)

0 comments on commit dc9327b

Please sign in to comment.