Comparing version 0.3.5 to 0.3.6
@@ -24,5 +24,5 @@ /* Based on Categorizr (https://github.com/bjankord/Categorizr) by Brett Jankord (http://www.brettjankord.com) */ | ||
var self = this; | ||
self.options = merge(defaultOptions, options); | ||
self.make_sure_parser_was_executed = function () { | ||
@@ -32,3 +32,3 @@ if (self.options.parseUserAgent === true && !self.useragent) | ||
}; | ||
self.get_model = function () { | ||
@@ -40,6 +40,6 @@ self.make_sure_parser_was_executed(); | ||
}; | ||
self.get_type = function () { | ||
var ua = user_agent; | ||
if (!ua || ua === '') { | ||
@@ -99,3 +99,3 @@ // No user agent. | ||
return 'desktop'; | ||
} else if (ua.match(/Mozilla\/5\.0 \(\)|jack|Applebot|FlipboardProxy|Go 1.1 package|HTMLParser|simplereach|python-requests|ShowyouBot|MetaURI|nineconnections|(^Java\/[0-9._]*)|Commons-HttpClient|InAGist|HTTP-Java-Client|curl|Wget|Bot|B-O-T|Crawler|Spider|Spyder|Yahoo|ia_archiver|Covario-IDS|findlinks|DataparkSearch|larbin|Mediapartners-Google|NG-Search|Snappy|Teoma|Jeeves|Charlotte|NewsGator|TinEye|Cerberian|SearchSight|Zao|Scrubby|Qseero|PycURL|Pompos|oegp|SBIder|yoogliFetchAgent|yacy|webcollage|VYU2|voyager|updated|truwoGPS|StackRambler|Sqworm|silk|semanticdiscovery|ScoutJet|Nymesis|NetResearchServer|MVAClient|mogimogi|Mnogosearch|Arachmo|Accoona|holmes|htdig|ichiro|webis|LinkWalker|lwp-trivial|facebookexternalhit|monit\/|ELB-HealthChecker\//i) && !ua.match(/phone|Playstation/i)) { | ||
} else if (ua.match(/Mozilla\/5\.0 \(\)|jack|Applebot|FlipboardProxy|Go 1.1 package|HTMLParser|simplereach|python-requests|ShowyouBot|MetaURI|nineconnections|(^Java\/[0-9._]*)|Commons-HttpClient|InAGist|HTTP-Java-Client|curl|Wget|Bot|B-O-T|Crawler|Spider|Spyder|Yahoo|ia_archiver|Covario-IDS|findlinks|DataparkSearch|larbin|Mediapartners-Google|NG-Search|Snappy|Teoma|Jeeves|Charlotte|NewsGator|TinEye|Cerberian|SearchSight|Zao|Scrubby|Qseero|PycURL|Pompos|oegp|SBIder|yoogliFetchAgent|yacy|webcollage|VYU2|voyager|updated|truwoGPS|StackRambler|Sqworm|silk|semanticdiscovery|ScoutJet|Nymesis|NetResearchServer|MVAClient|mogimogi|Mnogosearch|Arachmo|Accoona|holmes|htdig|ichiro|webis|LinkWalker|lwp-trivial|facebookexternalhit|monit\/|ELB-HealthChecker\/|JobBot/i) && !ua.match(/phone|Playstation/i)) { | ||
// if user agent is a BOT/Crawler/Spider | ||
@@ -123,3 +123,3 @@ return self.options.botUserAgentDeviceType; | ||
}; | ||
return device; | ||
@@ -126,0 +126,0 @@ } |
@@ -6,3 +6,3 @@ { | ||
"keywords": ["browser","mobile","detection","user-agent","useragent","desktop","phone","tablet","tv","bot","car","parsing","device"], | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"main": "./index.js", | ||
@@ -9,0 +9,0 @@ "private": false, |
@@ -1,2 +0,2 @@ | ||
# device [![Build Status](https://secure.travis-ci.org/rguerreiro/device.png?branch=master)](http://travis-ci.org/rguerreiro/device) [![NPM version](https://badge.fury.io/js/device.svg)](http://badge.fury.io/js/device) | ||
# device [![NPM version](http://img.shields.io/npm/v/device.svg?style=flat)](https://npmjs.org/package/device) [![Downloads](https://img.shields.io/npm/dm/device.svg?style=flat)](https://npmjs.org/package/device) [![Build Status](https://secure.travis-ci.org/rguerreiro/device.png?branch=master)](http://travis-ci.org/rguerreiro/device) | ||
@@ -99,3 +99,3 @@ ## device | ||
Currently, `device` is on **version 0.3.5**. In order to add more features I'm asking anyone to contribute with some ideas. You can do it by making some feature requests on the issues panel, but I prefer that you make your contribution with some pull requests ;) | ||
Currently, `device` is on **version 0.3.6**. In order to add more features I'm asking anyone to contribute with some ideas. You can do it by making some feature requests on the issues panel, but I prefer that you make your contribution with some pull requests ;) | ||
@@ -102,0 +102,0 @@ ## license |
Sorry, the diff of this file is too big to display
3452554
66689