Module: detect-agent

User agent detection for precise fixes.

Source:

CSS classes


$browserName$-v$version$-le
applied when browser is lower or equal version
$browserName$-v$version$-ge
applied when browser is higher or equal version
$browserName$-v$version$-l
applied when browser is lower version
$browserName$-v$version$-g
applied when browser is higher version

Methods


JS.Responsive.getAgentTags()

Returns browser tags

Since:
  • 3.0.0

Source:
Returns:

all browser tags strings in Array.

Type:
Array

JS.Responsive.getPlatformInfo()

Returns information about platform, browser and its version

Since:
  • 3.0.0

Source:
Returns:

containing "platform" as array, "browser" as string and "version" as number.

Type:
Object
Example
JS.Responsive.getPlatformInfo() returns
  {
		platform: Array["webkit", "windows", "chrome"],
		browser: "chrome",
		version: 43.5
  }

JS.Responsive.watchBrowserVersion(browser, version)

Set watching given browser and its version

Parameters:
NameTypeDescription
browserString

browser name, see function getAgentData() attribute "identity"

versionNumber

browser version number

Since:
  • 3.0.0

Source:
Returns:

this - for chaining.

Type:
Object
Examples
JS.Responsive.watchBrowserVersion('Webkit', 530);
JS.Responsive.watchBrowserVersion('Chrome', 47);
JS.Responsive.watchBrowserVersion('MSIE', 10);
JS.Responsive.watchBrowserVersion('Edge', 12);