Skip to content

Release 0.3.3 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#### 0.3.3 (2017-08-22)
* **Fixes:** Now is possible to *really* disable the bot detection with the option `detectBots: false` ([5e02e9a](https://github.com/WhichBrowser/Parser-JavaScript/commit/5e02e9a01fdee83b7bb0b6e91372b1870b157d52))

#### 0.3.2 (2017-07-27)
* **Database:** Added Chrome 68 ([0d04c8d](https://github.com/WhichBrowser/Parser-JavaScript/commit/0d04c8def9971c7a6bf16e1b1398bb475e69a310) & [cd5ec81](https://github.com/WhichBrowser/Parser-JavaScript/commit/cd5ec8183a6145dd901e3433c78846e1f9af5976))
* **Database:** Fixed name of Oculus Browser and added Oculus Go detection, thanks @frankolivier (#23) ([b38377c](https://github.com/WhichBrowser/Parser-JavaScript/commit/b38377c8d1856a316c6f74fea15ee3228aa050d6))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "which-browser",
"version": "0.3.2",
"version": "0.3.3",
"description": "Browser sniffing tool and UA parser. Browser sniffing gone too far — A useragent parser library for JavaScript",
"main": "src/Parser.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/Analyser/Header/Useragent.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Useragent {
Using.detectUsing.call(this, header);
Engine.detectEngine.call(this, header);
/* Detect bots */
if (!this.options.detectBots || this.options.detectBots === true) {
if (typeof this.options.detectBots === 'undefined' || this.options.detectBots === true) {
Bot.detectBot.call(this, header);
}
/* Refine some of the information */
Expand Down
20 changes: 10 additions & 10 deletions test/data/bots/disabled.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
-
detectBots: false
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'
result: { browser: { name: Bing, version: '1.1' }, device: { type: bot } }
readable: 'Bing 1.1'
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" } }
readable: 'Maxthon 4.4.5 on Windows 10'
-
detectBots: false
headers: 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) MsnBot-Media /1.0b'
result: { browser: { name: Bing, version: '1.0' }, device: { type: bot } }
readable: 'Bing 1.0'
result: { engine: { name: "Webkit", version: "534" }, os: { name: "Windows", version: { value: "6.1", alias: "7" } }, device: { type: "desktop" } }
readable: 'an unknown browser based on Webkit 534 running on Windows 7'
-
detectBots: false
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)'
result: { browser: { name: Googlebot, version: '2.1' }, device: { type: bot } }
readable: 'Googlebot 2.1'
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" }}
readable: 'Safari on an Apple iPhone running iOS 6.0'
-
detectBots: false
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)'
result: { browser: { name: Bing, version: '2.0' }, device: { type: bot } }
readable: 'Bing 2.0'
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" }}
readable: 'Safari on an Apple iPhone running iOS 7.0'
-
detectBots: false
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'
result: { browser: { name: 'Google Page Speed' }, device: { type: bot } }
readable: 'Google Page Speed'
result: { browser: { name: "Chrome", version: "27", type: "browser" }, engine: { name: "Blink" }, os: { name: "Linux" }, device: { type: "desktop" }, camouflage: true }
readable: 'an unknown browser that imitates Chrome 27 on Linux'