mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Manipulation: Reduce size by eliminating single-use variable
Closes gh-3851
This commit is contained in:
parent
60cc6c9fbf
commit
0aa832afec
@ -45,7 +45,6 @@ var
|
||||
|
||||
// checked="checked" or checked
|
||||
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
|
||||
rscriptTypeMasked = /^true\/(.*)/,
|
||||
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
|
||||
|
||||
// Prefer a tbody over its parent table for containing new rows
|
||||
@ -65,10 +64,8 @@ function disableScript( elem ) {
|
||||
return elem;
|
||||
}
|
||||
function restoreScript( elem ) {
|
||||
var match = rscriptTypeMasked.exec( elem.type );
|
||||
|
||||
if ( match ) {
|
||||
elem.type = match[ 1 ];
|
||||
if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) {
|
||||
elem.type = elem.type.slice( 5 );
|
||||
} else {
|
||||
elem.removeAttribute( "type" );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user