Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

Commit 578b3fe

Browse files
authored
Release 0.3.3 (#26)
* Wasn't impossible to disable bot detection. Fixed * Update Changelog and version number
1 parent ebcb77d commit 578b3fe

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#### 0.3.3 (2017-08-22)
2+
* **Fixes:** Now is possible to *really* disable the bot detection with the option `detectBots: false` ([5e02e9a](https://github.com/WhichBrowser/Parser-JavaScript/commit/5e02e9a01fdee83b7bb0b6e91372b1870b157d52))
3+
14
#### 0.3.2 (2017-07-27)
25
* **Database:** Added Chrome 68 ([0d04c8d](https://github.com/WhichBrowser/Parser-JavaScript/commit/0d04c8def9971c7a6bf16e1b1398bb475e69a310) & [cd5ec81](https://github.com/WhichBrowser/Parser-JavaScript/commit/cd5ec8183a6145dd901e3433c78846e1f9af5976))
36
* **Database:** Fixed name of Oculus Browser and added Oculus Go detection, thanks @frankolivier (#23) ([b38377c](https://github.com/WhichBrowser/Parser-JavaScript/commit/b38377c8d1856a316c6f74fea15ee3228aa050d6))

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "which-browser",
3-
"version": "0.3.2",
3+
"version": "0.3.3",
44
"description": "Browser sniffing tool and UA parser. Browser sniffing gone too far — A useragent parser library for JavaScript",
55
"main": "src/Parser.js",
66
"scripts": {

src/Analyser/Header/Useragent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Useragent {
1717
Using.detectUsing.call(this, header);
1818
Engine.detectEngine.call(this, header);
1919
/* Detect bots */
20-
if (!this.options.detectBots || this.options.detectBots === true) {
20+
if (typeof this.options.detectBots === 'undefined' || this.options.detectBots === true) {
2121
Bot.detectBot.call(this, header);
2222
}
2323
/* Refine some of the information */

test/data/bots/disabled.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
-
22
detectBots: false
33
headers: 'User-Agent: (Windows NT 10.0; Googlebot Googlebot-Image/1.0 msnbot-media/1.1 facebookexternalhit/1.1 Trident/7.0) Maxthon/4.4.5.3000 Firefox/38'
4-
result: { browser: { name: Bing, version: '1.1' }, device: { type: bot } }
5-
readable: 'Bing 1.1'
4+
result: { browser: { name: "Maxthon", family: { name: "Firefox", version: 38 }, version: "4.4.5", type: "browser" }, engine: { name: "Trident", version: "7.0" }, os: { name: "Windows", version: { value: "10.0", alias: "10" } }, device: { type: "desktop" } }
5+
readable: 'Maxthon 4.4.5 on Windows 10'
66
-
77
detectBots: false
88
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) MsnBot-Media /1.0b'
9-
result: { browser: { name: Bing, version: '1.0' }, device: { type: bot } }
10-
readable: 'Bing 1.0'
9+
result: { engine: { name: "Webkit", version: "534" }, os: { name: "Windows", version: { value: "6.1", alias: "7" } }, device: { type: "desktop" } }
10+
readable: 'an unknown browser based on Webkit 534 running on Windows 7'
1111
-
1212
detectBots: false
1313
headers: 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
14-
result: { browser: { name: Googlebot, version: '2.1' }, device: { type: bot } }
15-
readable: 'Googlebot 2.1'
14+
result: { browser: { name: "Safari", version: "6.0", type: "browser" }, engine: { name: "Webkit", version: "536.26" }, os: { name: "iOS", version: "6.0" }, device: { type: "mobile", subtype: "smart", manufacturer: "Apple", model: "iPhone" }}
15+
readable: 'Safari on an Apple iPhone running iOS 6.0'
1616
-
1717
detectBots: false
1818
headers: 'User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)'
19-
result: { browser: { name: Bing, version: '2.0' }, device: { type: bot } }
20-
readable: 'Bing 2.0'
19+
result: { browser: { name: "Safari", version: "7.0", type: "browser" }, engine: { name: "Webkit", version: "537.51.1" }, os: { name: "iOS", version: "7.0" }, device: { type: "mobile", subtype: "smart", manufacturer: "Apple", model: "iPhone" }}
20+
readable: 'Safari on an Apple iPhone running iOS 7.0'
2121
-
2222
detectBots: false
2323
headers: 'User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/27.0.1453 Safari/537.36'
24-
result: { browser: { name: 'Google Page Speed' }, device: { type: bot } }
25-
readable: 'Google Page Speed'
24+
result: { browser: { name: "Chrome", version: "27", type: "browser" }, engine: { name: "Blink" }, os: { name: "Linux" }, device: { type: "desktop" }, camouflage: true }
25+
readable: 'an unknown browser that imitates Chrome 27 on Linux'

0 commit comments

Comments
 (0)