Skip to content

Commit

Permalink
Merge branch 'main' into feat/site-apps-loading
Browse files Browse the repository at this point in the history
# Conflicts:
#	playground/nextjs/src/posthog.ts
#	src/__tests__/site-apps.ts
#	src/site-apps.ts
#	src/types.ts
#	src/utils/globals.ts
  • Loading branch information
benjackwhite committed Dec 5, 2024
2 parents fbef34a + eb8151f commit fa40e18
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 1.194.4 - 2024-12-05

- feat: RemoteConfig loader (#1577)

## 1.194.3 - 2024-12-03

- fix: parse Chrome instead of Android as browser (#1575)

## 1.194.2 - 2024-12-02

- fix: use previous site-app variables (#1574)
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": "posthog-js",
"version": "1.194.2",
"version": "1.194.4",
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
"repository": "https://github.com/PostHog/posthog-js",
"author": "[email protected]",
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/utils/event-utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,11 @@ describe(`event-utils`, () => {
expectedBrowser: 'Android Mobile',
},
{
name: 'Android Browser on Galaxy S3',
name: 'Chrome Browser on Galaxy S3',
userAgent:
'Mozilla/5.0 (Linux; Android 4.4.4; en-us; SAMSUNG GT-I9300I Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36',
expectedVersion: 4.4,
expectedBrowser: 'Android Mobile',
expectedVersion: 28.0,
expectedBrowser: 'Chrome',
},
]

Expand Down
4 changes: 2 additions & 2 deletions src/utils/user-agent-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ export const detectBrowser = function (user_agent: string, vendor: string | unde
return CHROME_IOS // why not just Chrome?
} else if (includes(user_agent, 'CrMo')) {
return CHROME
} else if (includes(user_agent, ANDROID) && includes(user_agent, SAFARI)) {
return ANDROID_MOBILE
} else if (includes(user_agent, CHROME)) {
return CHROME
} else if (includes(user_agent, ANDROID) && includes(user_agent, SAFARI)) {
return ANDROID_MOBILE
} else if (includes(user_agent, 'FxiOS')) {
return FIREFOX_IOS
} else if (includes(user_agent.toLowerCase(), KONQUEROR.toLowerCase())) {
Expand Down

0 comments on commit fa40e18

Please sign in to comment.