jQuery.browser.version fallback
This seems feasible.
--John
---------- Forwarded message ----------
From: Óscar Toledo G. <uno@biyubi.com>
Date: Tue, Jul 22, 2008 at 11:14 AM
Subject: jQuery enhancement
To: jeresig@gmail.com
John Resig:
Hi, I noted that on jQuery, when it calculates
jQuery.browser.version and not matches Mozilla,
MSIE, Opera or Webkit, it puts the undefined value.
That would of no harm, but Digg.com (on digg.js)
uses this value as version.split('.'), so
non-recognized browsers trigger a JS error, my
suggestion is to change [])[1] to at least:
[0,"1.0"])[1]
or:
userAgent.match(/\/([\d.]+)/))[1]
So 'version' gets assigned a meaningful value.
This would benefit new browsers.
Thanks for your time.
Óscar Toledo G.
http://www.biyubi.com/