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

Function getCurrentBrowserName

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

Source from the content-addressed store, hash-verified

175 !checkIsBrowser(UserAgent.Edge);
176
177export const getCurrentBrowserName = (): BrowserName => {
178 if (checkIsChromeOnly()) {
179 return BrowserName.Chrome;
180 }
181
182 if (isBrave()) {
183 return BrowserName.Brave;
184 }
185
186 if (checkIsBrowser(UserAgent.Firefox)) {
187 return BrowserName.Firefox;
188 }
189
190 if (checkIsBrowser(UserAgent.Edge)) {
191 return BrowserName.Edge;
192 }
193
194 if (checkIsBrowser(UserAgent.Safari)) {
195 return BrowserName.Safari;
196 }
197
198 return BrowserName.Other;
199};
200
201// Browsers we ship the daily.dev extension for — anything embed-extension
202// 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