Skip to content

Commit

Permalink
Changed the list of mobile_user_agents to reduce false positives and …
Browse files Browse the repository at this point in the history
…added more agents.
  • Loading branch information
alekseyg committed Sep 3, 2009
1 parent 9a705c7 commit dc9327b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/mobile_fu.rb
Expand Up @@ -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)
Expand Down

0 comments on commit dc9327b

Please sign in to comment.