From c284f3203f351153149f6b4fe8ffa717069a3c93 Mon Sep 17 00:00:00 2001 From: Valerio Proietti Date: Mon, 21 Dec 2009 19:35:37 +0100 Subject: [PATCH] - moved compatibility for $exec to Browser.js - moved $uid out of compatibility (1.3 still needs $uid) - Browser.extend is now Function.prototype.extend instead of Hash.extend --- Source/Browser/Browser.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Source/Browser/Browser.js b/Source/Browser/Browser.js index c6b38927..0915ad73 100644 --- a/Source/Browser/Browser.js +++ b/Source/Browser/Browser.js @@ -23,7 +23,10 @@ var UA = navigator.userAgent.toLowerCase().match(/(opera|ie|firefox|chrome|versi var Browser = this.Browser = { + extend: Function.prototype.extend, + name: (UA[1] == 'version') ? UA[3] : UA[1], + version: parseFloat(UA[2]), Platform: { @@ -37,9 +40,7 @@ var Browser = this.Browser = { json: !!(window.JSON) }, - Plugins: {}, - - extend: Hash.extend + Plugins: {} }; @@ -168,6 +169,14 @@ try { }; } +var UID = 1; + +var $uid = (window.ActiveXObject) ? function(item){ + return (item.uid || (item.uid = [UID++]))[0]; +} : function(item){ + return item.uid || (item.uid = UID++); +}; + })(); /**/ @@ -228,16 +237,6 @@ if (Browser.safari || Browser.chrome){ // presto950 = opera // presto960 = opera -var $exec = function(text){ - return Browser.exec(text); -}; - -Native.UID = 1; - -var $uid = (window.ActiveXObject) ? function(item){ - return (item.uid || (item.uid = [Native.UID++]))[0]; -} : function(item){ - return item.uid || (item.uid = Native.UID++); -}; +var $exec = Browser.exec; /**/ -- 2.11.4.GIT