diff --git a/src/detectors/plugins_inconsistency.ts b/src/detectors/plugins_inconsistency.ts index 29f79f04..e5faf796 100644 --- a/src/detectors/plugins_inconsistency.ts +++ b/src/detectors/plugins_inconsistency.ts @@ -1,14 +1,13 @@ -import { BotKind, BrowserEngineKind, BrowserKind, ComponentDict, DetectorResponse, State } from '../types' -import { getBrowserEngineKind, getBrowserKind, isAndroid, isDesktopSafari } from '../utils/browser' +import { BotKind, BrowserEngineKind, ComponentDict, DetectorResponse, State } from '../types' +import { getBrowserEngineKind, isAndroid, isDesktopSafari } from '../utils/browser' export function detectPluginsLengthInconsistency({ pluginsLength }: ComponentDict): DetectorResponse { if (pluginsLength.state !== State.Success) return - const browserKind = getBrowserKind() const browserEngineKind = getBrowserEngineKind() - // Chromium based android browsers and mobile safari have 0 plugins length. + // Chromium based android browsers and mobile webkit based browsers have 0 plugins length. if ( (browserEngineKind === BrowserEngineKind.Chromium && isAndroid()) || - (browserKind === BrowserKind.Safari && !isDesktopSafari()) + (browserEngineKind === BrowserEngineKind.Webkit && !isDesktopSafari()) ) return if (pluginsLength.value === 0) return BotKind.HeadlessChrome