MCPcopy Create free account
hub / github.com/dailydotdev/apps / getCurrentBrowserName

Function getCurrentBrowserName

packages/shared/src/lib/func.ts:189–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

187 !checkIsBrowser(UserAgent.Edge);
188
189export const getCurrentBrowserName = (): BrowserName => {
190 if (checkIsChromeOnly()) {
191 return BrowserName.Chrome;
192 }
193
194 if (isBrave()) {
195 return BrowserName.Brave;
196 }
197
198 if (checkIsBrowser(UserAgent.Firefox)) {
199 return BrowserName.Firefox;
200 }
201
202 if (checkIsBrowser(UserAgent.Edge)) {
203 return BrowserName.Edge;
204 }
205
206 if (checkIsBrowser(UserAgent.Safari)) {
207 return BrowserName.Safari;
208 }
209
210 return BrowserName.Other;
211};
212
213// Browsers we ship the daily.dev extension for — anything embed-extension
214// related (including GrowthBook enrollment for the reader experiment) should

Callers 7

IntroQuestModalFunction · 0.90
getPlatformFunction · 0.90
useOnboardingExtensionFunction · 0.90
CompanionDemoWidgetFunction · 0.90
GettingStartedWidgetFunction · 0.90

Calls 3

isBraveFunction · 0.90
checkIsChromeOnlyFunction · 0.85
checkIsBrowserFunction · 0.85

Tested by

no test coverage detected