Index: trunk/phase3/js2/js2stopgap.js |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | // (both of which we optimize for) |
32 | 32 | quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/, |
33 | 33 | // Is it a simple selector |
34 | | - isSimple = / ^ .[ ^ :# \[\.,]*$/; |
| 34 | + isSimple = /^.[^:# \[\.,]*$/; |
35 | 35 | |
36 | 36 | jQuery.fn = jQuery.prototype = { |
37 | 37 | init: function( selector, context ) { |
— | — | @@ -460,7 +460,7 @@ |
461 | 461 | if ( this.nodeType != 1 ) |
462 | 462 | return; |
463 | 463 | |
464 | | - if ( jQuery.isArray( value ) && / radio | checkbox / .test( this.type ) ) |
| 464 | + if ( jQuery.isArray( value ) && /radio|checkbox/ .test( this.type ) ) |
465 | 465 | this.checked = ( jQuery.inArray( this.value, value ) >= 0 || |
466 | 466 | jQuery.inArray( this.name, value ) >= 0 ); |
467 | 467 | |
— | — | @@ -791,7 +791,7 @@ |
792 | 792 | } |
793 | 793 | |
794 | 794 | // Make sure we're using the right name for getting the float value |
795 | | - if ( name.match( / float /i ) ) |
| 795 | + if ( name.match( /float/i ) ) |
796 | 796 | name = styleFloat; |
797 | 797 | |
798 | 798 | if ( !force && style && style[ name ] ) |
— | — | @@ -800,10 +800,10 @@ |
801 | 801 | else if ( defaultView.getComputedStyle ) { |
802 | 802 | |
803 | 803 | // Only "float" is needed here |
804 | | - if ( name.match( / float /i ) ) |
| 804 | + if ( name.match( /float/i ) ) |
805 | 805 | name = "float"; |
806 | 806 | |
807 | | - name = name.replace( / ( [A - Z] ) /g, "-$1" ).toLowerCase(); |
| 807 | + name = name.replace( /([A-Z])/g, "-$1" ).toLowerCase(); |
808 | 808 | |
809 | 809 | var computedStyle = defaultView.getComputedStyle( elem, null ); |
810 | 810 | |
Index: trunk/phase3/js2/js2stopgap.min.js |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | |
3 | 3 | (function(){var |
4 | | -window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:#\[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;} |
| 4 | +window=this,undefined,_jQuery=window.jQuery,_$=window.$,jQuery=window.jQuery=window.$=function(selector,context){return new jQuery.fn.init(selector,context);},quickExpr=/^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,isSimple=/^.[^:# \[\.,]*$/;jQuery.fn=jQuery.prototype={init:function(selector,context){selector=selector||document;if(selector.nodeType){this[0]=selector;this.length=1;this.context=selector;return this;} |
5 | 5 | if(typeof selector==="string"){var match=quickExpr.exec(selector);if(match&&(match[1]||!context)){if(match[1]) |
6 | 6 | selector=jQuery.clean([match[1]],context);else{var elem=document.getElementById(match[3]);if(elem&&elem.id!=match[3]) |
7 | 7 | return jQuery().find(selector);var ret=jQuery(elem||[]);ret.context=document;ret.selector=selector;return ret;}}else |