|Ratings||Unique User Downloads||Download Rankings|
|Not enough user ratings||Total: 93||All time: 427 This week: 5|
|thrak-browser 1.0||BSD License||1.0||Browser, jQuery, Utilities and Tools|
This object can retrieve information about the current browser.
The $.browser jQuery object is yet another pitiful and lamentable attempt to unify the information provided by various navigators. It tries to detect navigator name, version and other information that could be useful.
It currently supports chrome, firefox, ie, opera, safari and webkit-compatible. I can add support for more exotic navigators if you provide me a link where I can download them.
I will support MS Edge when the following two conditions will become true :
Step 1 : Include jQuery :
Step 2 : include the source file :
And voilą ! the $.browser object is available to your script...
This section describes the information you can retrieve from the $.browser object.
A small distinction has been made here between members and properties : - members are properties that always return the same value - properties needs some code to be execute to compute their return value.
Returns the user agent string. For example :
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
A structure describing the browser application version and containing the following properties :
Casting this structure to a string will return the major and minor version. Example : "5.0"
The following boolean properties are set to true or false, depending on your browser type : chrome, safari, firefox, opera, ie, webkit or unknown.
Only one of them will be true at the same time and reflects the type of browser you are using. The unknown property will be set to true if your browser type cannot be detected.
Note that I don't know so far what to do with the webkit property.
The $.browser.name property will contain the name of the property in the above list which has been set to true.
True if cookies are enabled in the browser.
User-friendly browser display name.
True if "do no track" settings are enabled on your browser.
A structure containing the following properties that specifies the browser's language :
This structure can be casted to a string, to obtain something like, for example, "fr-FR".
Browser name, as supplied by the user agent string.
A boolean indicating whether browing is online or not.
A structure describing the browser's platform :
Note that these information are rarely specified by the browsers. This structure can be casted to a string, which will result in : "os/version".
A structure describing the product :
This structure can be casted to a string which will result in the product name.
A structure describing vendor information : - name : Vendor name. - build : Vendor's application build number. May be largely undefined in IE.
This structure can be casted to a string, which will result in : "name/build".
A structure containing the following properties, identifying the browser's version :
Note that the 'revision' and 'build' properties may not be specified by all browsers. This structure can be casted to a version string, for example :
alert ( "Version : " + $. browser. version ) ;
The returned string will include the major, minor, revision and build numbers separated by a dot. Missing components will not be included (if the revision is undefined, then the resulting string will only include the major and minor version numbers, even if the build number is defined).
This section describes all the runtime properties whose values must be retrieved using :
$.browser.prop( 'property name' ) ;
Note that the val() function is a synonym of prop().
Returns true if java is enabled in your browser, false otherwise.
To be documented.
Returns the width of a vertical scrollbar, in pixels.
Returns the height of a horizontal scrollbar, in pixels.
|Version Control||Unique User Downloads||Download Rankings|