MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getAdUserAgent

Function getAdUserAgent

cli/src/hooks/use-gravity-ad.ts:506–513  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

504 */
505const AD_CHROME_VERSION = '124.0.0.0'
506function getAdUserAgent(): string {
507 const osUA: Record<string, string> = {
508 darwin: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${AD_CHROME_VERSION} Safari/537.36`,
509 win32: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${AD_CHROME_VERSION} Safari/537.36`,
510 linux: `Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/${AD_CHROME_VERSION} Safari/537.36`,
511 }
512 return osUA[process.platform] ?? osUA.linux
513}
514
515function getCliAdRequestUserAgent(): string {
516 const product = IS_FREEBUFF ? 'Freebuff-CLI' : 'Codebuff-CLI'

Callers 1

fetchAdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected