Skip to content

Commit

Permalink
Fix the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
Louis-Rémi Babé committed Aug 20, 2012
1 parent 49219ce commit ed2ad7f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jquery.browser.js
Expand Up @@ -2,18 +2,18 @@

var ua = navigator.userAgent.toLowerCase(),
match,
i = 0,
// Useragent RegExp
rbrowsers = [
/(chrome)[ \/]([\w.]+)/,
/(safari)[ \/]([\w.]+)/,
/(opera)(?:.*version)?[ \/]([\w.]+)/,
/(msie) ([\w.]+)/,
/(mozilla)(?:.*? rv:([\w.]+))?/
];
],
i = rbrowsers.length;

$.browser = {};
while ( i++ < rbrowsers.length ) {
while ( i-- ) {
if ( (match = rbrowsers[i].exec( ua )) && match[1] ) {
$.browser[ match[1] ] = true;
$.browser.version = match[2] || "0";
Expand Down

0 comments on commit ed2ad7f

Please sign in to comment.