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

Function getCurrentBrowserName

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

Source from the content-addressed store, hash-verified

161 !checkIsBrowser(UserAgent.Edge);
162
163export const getCurrentBrowserName = (): BrowserName => {
164 if (checkIsChromeOnly()) {
165 return BrowserName.Chrome;
166 }
167
168 if (isBrave()) {
169 return BrowserName.Brave;
170 }
171
172 if (checkIsBrowser(UserAgent.Firefox)) {
173 return BrowserName.Firefox;
174 }
175
176 if (checkIsBrowser(UserAgent.Edge)) {
177 return BrowserName.Edge;
178 }
179
180 if (checkIsBrowser(UserAgent.Safari)) {
181 return BrowserName.Safari;
182 }
183
184 return BrowserName.Other;
185};
186
187// Browsers we ship the daily.dev extension for — anything embed-extension
188// related (including GrowthBook enrollment for the reader experiment) should

Callers 7

SearchControlHeaderFunction · 0.90
LiveRoomInnerFunction · 0.90
IntroQuestModalFunction · 0.90
useOnboardingExtensionFunction · 0.90
CompanionDemoWidgetFunction · 0.90

Calls 3

isBraveFunction · 0.90
checkIsChromeOnlyFunction · 0.85
checkIsBrowserFunction · 0.85

Tested by

no test coverage detected