MCPcopy
hub / github.com/fingerprintjs/fingerprintjs / isChromium

Function isChromium

src/utils/browser.ts:53–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 * This function is out of Semantic Versioning, i.e. can change unexpectedly. Usage is at your own risk.
52 */
53export function isChromium(): boolean {
54 // Based on research in October 2020. Tested to detect Chromium 42-86.
55 const w = window
56 const n = navigator
57
58 return (
59 countTruthy([
60 'webkitPersistentStorage' in n,
61 'webkitTemporaryStorage' in n,
62 (n.vendor || '').indexOf('Google') === 0,
63 'webkitResolveLocalFileSystemURL' in w,
64 'BatteryManager' in w,
65 'webkitMediaStream' in w,
66 'webkitSpeechGrammar' in w,
67 ]) >= 5
68 )
69}
70
71/**
72 * Checks whether the browser is based on mobile or desktop Safari without using user-agent.

Callers 9

getLanguagesFunction · 0.90
vendor.test.tsFile · 0.90
fonts.test.tsFile · 0.90
getFontPreferencesFunction · 0.90
withNaturalFontsFunction · 0.90
isAndroidFunction · 0.70

Calls 1

countTruthyFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…