BrowserHelper

Static helper class that does browser or platform detection and provides other helper functions.

Properties

13

Browser

chromeVersion: Numberreadonlystatic

Returns the major Chrome version or 0 for other browsers.

firefoxVersion: Numberreadonlystatic

Returns the major Firefox version or 0 for other browsers.

isChrome: Booleanreadonlystatic

Checks if browser is Chrome or Chromium based browser. Returns truthy value for Edge Chromium.

isFirefox: Booleanreadonlystatic

Checks if browser is Firefox.

isMobile: Booleanreadonlystatic

Checks if the active device is a mobile device

isMobileSafari: Booleanreadonlystatic

Checks if browser is mobile Safari

isSafari: Booleanreadonlystatic

Checks if browser is Safari.

isWebkit: Booleanreadonlystatic

Checks if browser is Webkit.

Platform

isAndroid: Booleanreadonlystatic

Checks if platform is Android.

isLinux: Booleanreadonlystatic

Checks if platform is Linux.

isMac: Booleanreadonlystatic

Checks if platform is Mac.

isPhone: Booleanreadonly

Yields true if the platform running is a phone (screen width or height <= 414 CSS pixels)

isWindows: Booleanreadonlystatic

Checks if platform is Windows.

Functions

2
getCookiestatic

Returns cookie by name.

ParameterTypeDescription
nameString

cookie name

Returns: String -

cookie string value

Returns parameter value from search string by parameter name.

ParameterTypeDescription
paramNameString

search parameter name

defaultValueString

default value if parameter not found

searchString

search string. Defaults to document.location.search

Returns: String -

search parameter string value