util.js
No description.

File Location

/goog/labs/useragent/util.js


Public Protected Private

Global Functions

goog.labs.userAgent.util.extractVersionTuples(userAgent) !Array.<!Array.<string>>
Parses the user agent into tuples for each section.
Arguments:
userAgent : string
No description.
Returns: !Array.<!Array.<string>>  Tuples of key, version, and the contents of the parenthetical.
code »
goog.labs.userAgent.util.getNativeUserAgentString_() string
Gets the native userAgent string from navigator if it exists. If navigator or navigator.userAgent string is missing, returns an empty string.
Returns: string  No description.
code »
goog.labs.userAgent.util.getNavigator_() Navigator
Getter for the native navigator. This is a separate function so it can be stubbed out in testing.
Returns: Navigator  No description.
code »
goog.labs.userAgent.util.getUserAgent() string
No description.
Returns: string  The user agent string.
code »
goog.labs.userAgent.util.matchUserAgent(str) boolean
No description.
Arguments:
str : string
No description.
Returns: boolean  Whether the user agent contains the given string, ignoring case.
code »
goog.labs.userAgent.util.matchUserAgentIgnoreCase(str) boolean
No description.
Arguments:
str : string
No description.
Returns: boolean  Whether the user agent contains the given string.
code »
goog.labs.userAgent.util.setUserAgent(opt_userAgent)
Applications may override browser detection on the built in navigator.userAgent object by setting this string. Set to null to use the browser object instead.
Arguments:
opt_userAgent : ?string=
The User-Agent override.
code »

Directory useragent

File Reference