- Copyright:
- (c) Copyright 2013 - 2016 AV Digital Media Ltd. All Rights Reserved. No unauthorized copying, distribution or modification to this code in whole or in part is permitted without the express permission of AV Digital Media Ltd (UK).
Properties:
Name | Type | Description |
---|---|---|
str |
String | This is the original user agent string supplied by the browser |
browser |
String | This is the browser name for the current user |
mobile |
Boolean | This is a boolean 1 or 0 determining if this is a mobile device |
platform |
String | This is the platform the user is operating under |
version |
String | This is the version if the browser |
os |
String | This is the operating system the user is currently on |
osVersion |
String | This is the operating system version number |
language |
String | This is the user set language |
hasTouch |
Boolean | Has touch inputs, this does not mean a mobile device but only determines if the current user devices supports touch events |
vendor |
String | Has touch inputs, this does not mean a mobile device but only determines if the current user devices supports touch events |
cookies |
Boolean | This is the determination as to whether the user currently supports cookies |
This is a simple utility that captures the user agent data and parses the varied values into properties
Methods
(private, static) getBrowser()
Set the current browser value
(protected, static) getDims()
Gets the window dimensions
(private, static) getOS()
Get the current Version
(private, static) initialise()
Initialise the object and set the default properties
(protected, static) search(regexp)
Custom search for the user agent array
Parameters:
Name | Type | Description |
---|---|---|
regexp |
RegExp | A regular expression |
Returns:
This will return the result of the regular expression test function