This repository has been archived by the owner on Jun 24, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
jquery-1.2.1.min.js
13 lines (13 loc) · 1.87 KB
/
jquery-1.2.1.min.js
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
* jQuery 1.2.1 - New Wave Javascript
*
* Copyright (c) 2007 John Resig (jquery.com)
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
* 2012-10-08: Updated by Joe Coutcher to support newer versions of jQuery (tested with 1.7.2...may work with others)
* Fork: https://github.com/jcoutch/jquery-profile/
*
* $Date: 2012-10-08 13:48:00 -0400 (Mon, 8 Oct 2012) $
*/
(function(a){function f(){g();e=jQuery.fn.init;jQuery.fn.init=jQuery.prototype.init=function(a,b,f){b=b||window.document;var g=new Date;var h=new e(a,b,f);var i=new Date-g;if(typeof a=="string"){var j=d[a];if(!j){j=d[a]={selector:a,count:0,total:0,squares:0};c.push(j)}j.count+=1;j.total+=i;j.squares+=i*i}return h};console.info("jQuery profiling started...")}function g(){c=[];d={}}var b=a.profile=f;var c,d,e;a.extend(b,{done:function(){this.stop();this.report()},start:f,reset:g,report:function(a){a=a||{};c.sort(function(a,b){return b.total-a.total});var b=[],d=new RegExp("(.{"+(a.maxSelectorLength||20)+"}).*");b.push(["Selector","Count","Total","Avg+/-stddev"]);for(var e=0;e<Math.min(a.limit||10,c.length);e++){var f=c[e],g=f.count,h=f.total/g,i=Math.sqrt((g*f.squares-h*h)/(g*(g-1)));b.push([f.selector.replace(d,"$1..."),g,f.total+"ms",(h+(g>1?"ms+/-"+i:"ms")).replace(/(\.\d\d)\d+/g,"$1")])}this.printTable(b,{0:{align:"left"},3:{align:"left"}})},printTable:function(a,b){var c=[],d=" ";for(var e=0;e<a.length;e++)for(var f=0;f<a[e].length;f++)c[f]=Math.max(c[f]||0,String(a[e][f]).length);for(var e=0;e<a.length;e++){var g=a[e],h=[];for(var f=0;f<g.length;f++){var i=c[f]-String(g[f]).length;while(d.length<i)d+=d;var j=d.slice(0,i),k=(b[f]||{}).align=="left";k||h.push(j);h.push(g[f]);k&&h.push(j)}console.info(h.join(" "))}},stop:function(){if(e){jQuery.fn.init=e;e=null}}});b.start=f})(jQuery);if(window.location.search.match(/[\?&]jquery.profile.start\b/))jQuery.profile()