Skip to main content

Bug Tracker

Side navigation

Ticket #3374: osdetect.diff


File osdetect.diff, 0.6 KB (added by raccettura, September 17, 2008 07:16PM UTC)

jQuery.os

Index: trunk/jquery/src/core.js
===================================================================
--- trunk/jquery/src/core.js	(revision 5845)
+++ trunk/jquery/src/core.js	(working copy)
@@ -1230,6 +1230,14 @@
 	mozilla: /mozilla/.test( userAgent ) && !/(compatible|webkit)/.test( userAgent )
 };
 
+// Figure out what OS is being used
+jQuery.browser = {
+	mac: /mac/.test(userAgent),
+	win: /win/.test(userAgent),
+	linux: /linux/.test(userAgent),
+	iphone: /iphone/.test(userAgent)
+};
+
 var styleFloat = jQuery.browser.msie ?
 	"styleFloat" :
 	"cssFloat";

Download in other formats:

Original Format