Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-inclu.../js/jquery
File: jquery-migrate.js
// | /----------\ |
[500] Fix | Delete
// | /-------------\ | | |- END
[501] Fix | Delete
// | | | | / Top \ | |
[502] Fix | Delete
// | | / Margin \ | | | Right | | |
[503] Fix | Delete
// |---------+-| |-+---+-| Bottom |-+----|
[504] Fix | Delete
// | \ Padding / \ Left / |
[505] Fix | Delete
// BEGIN -| |
[506] Fix | Delete
// | /---------\ |
[507] Fix | Delete
// | | | |
[508] Fix | Delete
// | | / Min \ | / Width \ |
[509] Fix | Delete
// \--------------+-| |-+---| |---/
[510] Fix | Delete
// \ Max / \ Height /
[511] Fix | Delete
rautoPx = /^(?:Border(?:Top|Right|Bottom|Left)?(?:Width|)|(?:Margin|Padding)?(?:Top|Right|Bottom|Left)?|(?:Min|Max)?(?:Width|Height))$/;
[512] Fix | Delete
[513] Fix | Delete
// If this version of jQuery has .swap(), don't false-alarm on internal uses
[514] Fix | Delete
if ( jQuery.swap ) {
[515] Fix | Delete
jQuery.each( [ "height", "width", "reliableMarginRight" ], function( _, name ) {
[516] Fix | Delete
var oldHook = jQuery.cssHooks[ name ] && jQuery.cssHooks[ name ].get;
[517] Fix | Delete
[518] Fix | Delete
if ( oldHook ) {
[519] Fix | Delete
jQuery.cssHooks[ name ].get = function() {
[520] Fix | Delete
var ret;
[521] Fix | Delete
[522] Fix | Delete
internalSwapCall = true;
[523] Fix | Delete
ret = oldHook.apply( this, arguments );
[524] Fix | Delete
internalSwapCall = false;
[525] Fix | Delete
return ret;
[526] Fix | Delete
};
[527] Fix | Delete
}
[528] Fix | Delete
} );
[529] Fix | Delete
}
[530] Fix | Delete
[531] Fix | Delete
migratePatchFunc( jQuery, "swap", function( elem, options, callback, args ) {
[532] Fix | Delete
var ret, name,
[533] Fix | Delete
old = {};
[534] Fix | Delete
[535] Fix | Delete
if ( !internalSwapCall ) {
[536] Fix | Delete
migrateWarn( "swap", "jQuery.swap() is undocumented and deprecated" );
[537] Fix | Delete
}
[538] Fix | Delete
[539] Fix | Delete
// Remember the old values, and insert the new ones
[540] Fix | Delete
for ( name in options ) {
[541] Fix | Delete
old[ name ] = elem.style[ name ];
[542] Fix | Delete
elem.style[ name ] = options[ name ];
[543] Fix | Delete
}
[544] Fix | Delete
[545] Fix | Delete
ret = callback.apply( elem, args || [] );
[546] Fix | Delete
[547] Fix | Delete
// Revert the old values
[548] Fix | Delete
for ( name in options ) {
[549] Fix | Delete
elem.style[ name ] = old[ name ];
[550] Fix | Delete
}
[551] Fix | Delete
[552] Fix | Delete
return ret;
[553] Fix | Delete
}, "swap" );
[554] Fix | Delete
[555] Fix | Delete
if ( jQueryVersionSince( "3.4.0" ) && typeof Proxy !== "undefined" ) {
[556] Fix | Delete
jQuery.cssProps = new Proxy( jQuery.cssProps || {}, {
[557] Fix | Delete
set: function() {
[558] Fix | Delete
migrateWarn( "cssProps", "jQuery.cssProps is deprecated" );
[559] Fix | Delete
return Reflect.set.apply( this, arguments );
[560] Fix | Delete
}
[561] Fix | Delete
} );
[562] Fix | Delete
}
[563] Fix | Delete
[564] Fix | Delete
// In jQuery >=4 where jQuery.cssNumber is missing fill it with the latest 3.x version:
[565] Fix | Delete
// https://github.com/jquery/jquery/blob/3.6.0/src/css.js#L212-L233
[566] Fix | Delete
// This way, number values for the CSS properties below won't start triggering
[567] Fix | Delete
// Migrate warnings when jQuery gets updated to >=4.0.0 (gh-438).
[568] Fix | Delete
if ( jQueryVersionSince( "4.0.0" ) ) {
[569] Fix | Delete
[570] Fix | Delete
// We need to keep this as a local variable as we need it internally
[571] Fix | Delete
// in a `jQuery.fn.css` patch and this usage shouldn't warn.
[572] Fix | Delete
internalCssNumber = {
[573] Fix | Delete
animationIterationCount: true,
[574] Fix | Delete
columnCount: true,
[575] Fix | Delete
fillOpacity: true,
[576] Fix | Delete
flexGrow: true,
[577] Fix | Delete
flexShrink: true,
[578] Fix | Delete
fontWeight: true,
[579] Fix | Delete
gridArea: true,
[580] Fix | Delete
gridColumn: true,
[581] Fix | Delete
gridColumnEnd: true,
[582] Fix | Delete
gridColumnStart: true,
[583] Fix | Delete
gridRow: true,
[584] Fix | Delete
gridRowEnd: true,
[585] Fix | Delete
gridRowStart: true,
[586] Fix | Delete
lineHeight: true,
[587] Fix | Delete
opacity: true,
[588] Fix | Delete
order: true,
[589] Fix | Delete
orphans: true,
[590] Fix | Delete
widows: true,
[591] Fix | Delete
zIndex: true,
[592] Fix | Delete
zoom: true
[593] Fix | Delete
};
[594] Fix | Delete
[595] Fix | Delete
if ( typeof Proxy !== "undefined" ) {
[596] Fix | Delete
jQuery.cssNumber = new Proxy( internalCssNumber, {
[597] Fix | Delete
get: function() {
[598] Fix | Delete
migrateWarn( "css-number", "jQuery.cssNumber is deprecated" );
[599] Fix | Delete
return Reflect.get.apply( this, arguments );
[600] Fix | Delete
},
[601] Fix | Delete
set: function() {
[602] Fix | Delete
migrateWarn( "css-number", "jQuery.cssNumber is deprecated" );
[603] Fix | Delete
return Reflect.set.apply( this, arguments );
[604] Fix | Delete
}
[605] Fix | Delete
} );
[606] Fix | Delete
} else {
[607] Fix | Delete
[608] Fix | Delete
// Support: IE 9-11+
[609] Fix | Delete
// IE doesn't support proxies, but we still want to restore the legacy
[610] Fix | Delete
// jQuery.cssNumber there.
[611] Fix | Delete
jQuery.cssNumber = internalCssNumber;
[612] Fix | Delete
}
[613] Fix | Delete
} else {
[614] Fix | Delete
[615] Fix | Delete
// Make `internalCssNumber` defined for jQuery <4 as well as it's needed
[616] Fix | Delete
// in the `jQuery.fn.css` patch below.
[617] Fix | Delete
internalCssNumber = jQuery.cssNumber;
[618] Fix | Delete
}
[619] Fix | Delete
[620] Fix | Delete
function isAutoPx( prop ) {
[621] Fix | Delete
[622] Fix | Delete
// The first test is used to ensure that:
[623] Fix | Delete
// 1. The prop starts with a lowercase letter (as we uppercase it for the second regex).
[624] Fix | Delete
// 2. The prop is not empty.
[625] Fix | Delete
return ralphaStart.test( prop ) &&
[626] Fix | Delete
rautoPx.test( prop[ 0 ].toUpperCase() + prop.slice( 1 ) );
[627] Fix | Delete
}
[628] Fix | Delete
[629] Fix | Delete
origFnCss = jQuery.fn.css;
[630] Fix | Delete
[631] Fix | Delete
migratePatchFunc( jQuery.fn, "css", function( name, value ) {
[632] Fix | Delete
var camelName,
[633] Fix | Delete
origThis = this;
[634] Fix | Delete
[635] Fix | Delete
if ( name && typeof name === "object" && !Array.isArray( name ) ) {
[636] Fix | Delete
jQuery.each( name, function( n, v ) {
[637] Fix | Delete
jQuery.fn.css.call( origThis, n, v );
[638] Fix | Delete
} );
[639] Fix | Delete
return this;
[640] Fix | Delete
}
[641] Fix | Delete
[642] Fix | Delete
if ( typeof value === "number" ) {
[643] Fix | Delete
camelName = camelCase( name );
[644] Fix | Delete
[645] Fix | Delete
// Use `internalCssNumber` to avoid triggering our warnings in this
[646] Fix | Delete
// internal check.
[647] Fix | Delete
if ( !isAutoPx( camelName ) && !internalCssNumber[ camelName ] ) {
[648] Fix | Delete
migrateWarn( "css-number",
[649] Fix | Delete
"Number-typed values are deprecated for jQuery.fn.css( \"" +
[650] Fix | Delete
name + "\", value )" );
[651] Fix | Delete
}
[652] Fix | Delete
}
[653] Fix | Delete
[654] Fix | Delete
return origFnCss.apply( this, arguments );
[655] Fix | Delete
}, "css-number" );
[656] Fix | Delete
[657] Fix | Delete
var origData = jQuery.data;
[658] Fix | Delete
[659] Fix | Delete
migratePatchFunc( jQuery, "data", function( elem, name, value ) {
[660] Fix | Delete
var curData, sameKeys, key;
[661] Fix | Delete
[662] Fix | Delete
// Name can be an object, and each entry in the object is meant to be set as data
[663] Fix | Delete
if ( name && typeof name === "object" && arguments.length === 2 ) {
[664] Fix | Delete
[665] Fix | Delete
curData = jQuery.hasData( elem ) && origData.call( this, elem );
[666] Fix | Delete
sameKeys = {};
[667] Fix | Delete
for ( key in name ) {
[668] Fix | Delete
if ( key !== camelCase( key ) ) {
[669] Fix | Delete
migrateWarn( "data-camelCase",
[670] Fix | Delete
"jQuery.data() always sets/gets camelCased names: " + key );
[671] Fix | Delete
curData[ key ] = name[ key ];
[672] Fix | Delete
} else {
[673] Fix | Delete
sameKeys[ key ] = name[ key ];
[674] Fix | Delete
}
[675] Fix | Delete
}
[676] Fix | Delete
[677] Fix | Delete
origData.call( this, elem, sameKeys );
[678] Fix | Delete
[679] Fix | Delete
return name;
[680] Fix | Delete
}
[681] Fix | Delete
[682] Fix | Delete
// If the name is transformed, look for the un-transformed name in the data object
[683] Fix | Delete
if ( name && typeof name === "string" && name !== camelCase( name ) ) {
[684] Fix | Delete
[685] Fix | Delete
curData = jQuery.hasData( elem ) && origData.call( this, elem );
[686] Fix | Delete
if ( curData && name in curData ) {
[687] Fix | Delete
migrateWarn( "data-camelCase",
[688] Fix | Delete
"jQuery.data() always sets/gets camelCased names: " + name );
[689] Fix | Delete
if ( arguments.length > 2 ) {
[690] Fix | Delete
curData[ name ] = value;
[691] Fix | Delete
}
[692] Fix | Delete
return curData[ name ];
[693] Fix | Delete
}
[694] Fix | Delete
}
[695] Fix | Delete
[696] Fix | Delete
return origData.apply( this, arguments );
[697] Fix | Delete
}, "data-camelCase" );
[698] Fix | Delete
[699] Fix | Delete
// Support jQuery slim which excludes the effects module
[700] Fix | Delete
if ( jQuery.fx ) {
[701] Fix | Delete
[702] Fix | Delete
var intervalValue, intervalMsg,
[703] Fix | Delete
oldTweenRun = jQuery.Tween.prototype.run,
[704] Fix | Delete
linearEasing = function( pct ) {
[705] Fix | Delete
return pct;
[706] Fix | Delete
};
[707] Fix | Delete
[708] Fix | Delete
migratePatchFunc( jQuery.Tween.prototype, "run", function( ) {
[709] Fix | Delete
if ( jQuery.easing[ this.easing ].length > 1 ) {
[710] Fix | Delete
migrateWarn(
[711] Fix | Delete
"easing-one-arg",
[712] Fix | Delete
"'jQuery.easing." + this.easing.toString() + "' should use only one argument"
[713] Fix | Delete
);
[714] Fix | Delete
[715] Fix | Delete
jQuery.easing[ this.easing ] = linearEasing;
[716] Fix | Delete
}
[717] Fix | Delete
[718] Fix | Delete
oldTweenRun.apply( this, arguments );
[719] Fix | Delete
}, "easing-one-arg" );
[720] Fix | Delete
[721] Fix | Delete
intervalValue = jQuery.fx.interval;
[722] Fix | Delete
intervalMsg = "jQuery.fx.interval is deprecated";
[723] Fix | Delete
[724] Fix | Delete
// Support: IE9, Android <=4.4
[725] Fix | Delete
// Avoid false positives on browsers that lack rAF
[726] Fix | Delete
// Don't warn if document is hidden, jQuery uses setTimeout (#292)
[727] Fix | Delete
if ( window.requestAnimationFrame ) {
[728] Fix | Delete
Object.defineProperty( jQuery.fx, "interval", {
[729] Fix | Delete
configurable: true,
[730] Fix | Delete
enumerable: true,
[731] Fix | Delete
get: function() {
[732] Fix | Delete
if ( !window.document.hidden ) {
[733] Fix | Delete
migrateWarn( "fx-interval", intervalMsg );
[734] Fix | Delete
}
[735] Fix | Delete
[736] Fix | Delete
// Only fallback to the default if patch is enabled
[737] Fix | Delete
if ( !jQuery.migrateIsPatchEnabled( "fx-interval" ) ) {
[738] Fix | Delete
return intervalValue;
[739] Fix | Delete
}
[740] Fix | Delete
return intervalValue === undefined ? 13 : intervalValue;
[741] Fix | Delete
},
[742] Fix | Delete
set: function( newValue ) {
[743] Fix | Delete
migrateWarn( "fx-interval", intervalMsg );
[744] Fix | Delete
intervalValue = newValue;
[745] Fix | Delete
}
[746] Fix | Delete
} );
[747] Fix | Delete
}
[748] Fix | Delete
[749] Fix | Delete
}
[750] Fix | Delete
[751] Fix | Delete
var oldLoad = jQuery.fn.load,
[752] Fix | Delete
oldEventAdd = jQuery.event.add,
[753] Fix | Delete
originalFix = jQuery.event.fix;
[754] Fix | Delete
[755] Fix | Delete
jQuery.event.props = [];
[756] Fix | Delete
jQuery.event.fixHooks = {};
[757] Fix | Delete
[758] Fix | Delete
migrateWarnProp( jQuery.event.props, "concat", jQuery.event.props.concat,
[759] Fix | Delete
"event-old-patch",
[760] Fix | Delete
"jQuery.event.props.concat() is deprecated and removed" );
[761] Fix | Delete
[762] Fix | Delete
migratePatchFunc( jQuery.event, "fix", function( originalEvent ) {
[763] Fix | Delete
var event,
[764] Fix | Delete
type = originalEvent.type,
[765] Fix | Delete
fixHook = this.fixHooks[ type ],
[766] Fix | Delete
props = jQuery.event.props;
[767] Fix | Delete
[768] Fix | Delete
if ( props.length ) {
[769] Fix | Delete
migrateWarn( "event-old-patch",
[770] Fix | Delete
"jQuery.event.props are deprecated and removed: " + props.join() );
[771] Fix | Delete
while ( props.length ) {
[772] Fix | Delete
jQuery.event.addProp( props.pop() );
[773] Fix | Delete
}
[774] Fix | Delete
}
[775] Fix | Delete
[776] Fix | Delete
if ( fixHook && !fixHook._migrated_ ) {
[777] Fix | Delete
fixHook._migrated_ = true;
[778] Fix | Delete
migrateWarn( "event-old-patch",
[779] Fix | Delete
"jQuery.event.fixHooks are deprecated and removed: " + type );
[780] Fix | Delete
if ( ( props = fixHook.props ) && props.length ) {
[781] Fix | Delete
while ( props.length ) {
[782] Fix | Delete
jQuery.event.addProp( props.pop() );
[783] Fix | Delete
}
[784] Fix | Delete
}
[785] Fix | Delete
}
[786] Fix | Delete
[787] Fix | Delete
event = originalFix.call( this, originalEvent );
[788] Fix | Delete
[789] Fix | Delete
return fixHook && fixHook.filter ?
[790] Fix | Delete
fixHook.filter( event, originalEvent ) :
[791] Fix | Delete
event;
[792] Fix | Delete
}, "event-old-patch" );
[793] Fix | Delete
[794] Fix | Delete
migratePatchFunc( jQuery.event, "add", function( elem, types ) {
[795] Fix | Delete
[796] Fix | Delete
// This misses the multiple-types case but that seems awfully rare
[797] Fix | Delete
if ( elem === window && types === "load" && window.document.readyState === "complete" ) {
[798] Fix | Delete
migrateWarn( "load-after-event",
[799] Fix | Delete
"jQuery(window).on('load'...) called after load event occurred" );
[800] Fix | Delete
}
[801] Fix | Delete
return oldEventAdd.apply( this, arguments );
[802] Fix | Delete
}, "load-after-event" );
[803] Fix | Delete
[804] Fix | Delete
jQuery.each( [ "load", "unload", "error" ], function( _, name ) {
[805] Fix | Delete
[806] Fix | Delete
migratePatchFunc( jQuery.fn, name, function() {
[807] Fix | Delete
var args = Array.prototype.slice.call( arguments, 0 );
[808] Fix | Delete
[809] Fix | Delete
// If this is an ajax load() the first arg should be the string URL;
[810] Fix | Delete
// technically this could also be the "Anything" arg of the event .load()
[811] Fix | Delete
// which just goes to show why this dumb signature has been deprecated!
[812] Fix | Delete
// jQuery custom builds that exclude the Ajax module justifiably die here.
[813] Fix | Delete
if ( name === "load" && typeof args[ 0 ] === "string" ) {
[814] Fix | Delete
return oldLoad.apply( this, args );
[815] Fix | Delete
}
[816] Fix | Delete
[817] Fix | Delete
migrateWarn( "shorthand-removed-v3",
[818] Fix | Delete
"jQuery.fn." + name + "() is deprecated" );
[819] Fix | Delete
[820] Fix | Delete
args.splice( 0, 0, name );
[821] Fix | Delete
if ( arguments.length ) {
[822] Fix | Delete
return this.on.apply( this, args );
[823] Fix | Delete
}
[824] Fix | Delete
[825] Fix | Delete
// Use .triggerHandler here because:
[826] Fix | Delete
// - load and unload events don't need to bubble, only applied to window or image
[827] Fix | Delete
// - error event should not bubble to window, although it does pre-1.7
[828] Fix | Delete
// See http://bugs.jquery.com/ticket/11820
[829] Fix | Delete
this.triggerHandler.apply( this, args );
[830] Fix | Delete
return this;
[831] Fix | Delete
}, "shorthand-removed-v3" );
[832] Fix | Delete
[833] Fix | Delete
} );
[834] Fix | Delete
[835] Fix | Delete
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
[836] Fix | Delete
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
[837] Fix | Delete
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
[838] Fix | Delete
function( _i, name ) {
[839] Fix | Delete
[840] Fix | Delete
// Handle event binding
[841] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, name, function( data, fn ) {
[842] Fix | Delete
return arguments.length > 0 ?
[843] Fix | Delete
this.on( name, null, data, fn ) :
[844] Fix | Delete
this.trigger( name );
[845] Fix | Delete
},
[846] Fix | Delete
"shorthand-deprecated-v3",
[847] Fix | Delete
"jQuery.fn." + name + "() event shorthand is deprecated" );
[848] Fix | Delete
} );
[849] Fix | Delete
[850] Fix | Delete
// Trigger "ready" event only once, on document ready
[851] Fix | Delete
jQuery( function() {
[852] Fix | Delete
jQuery( window.document ).triggerHandler( "ready" );
[853] Fix | Delete
} );
[854] Fix | Delete
[855] Fix | Delete
jQuery.event.special.ready = {
[856] Fix | Delete
setup: function() {
[857] Fix | Delete
if ( this === window.document ) {
[858] Fix | Delete
migrateWarn( "ready-event", "'ready' event is deprecated" );
[859] Fix | Delete
}
[860] Fix | Delete
}
[861] Fix | Delete
};
[862] Fix | Delete
[863] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "bind", function( types, data, fn ) {
[864] Fix | Delete
return this.on( types, null, data, fn );
[865] Fix | Delete
}, "pre-on-methods", "jQuery.fn.bind() is deprecated" );
[866] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "unbind", function( types, fn ) {
[867] Fix | Delete
return this.off( types, null, fn );
[868] Fix | Delete
}, "pre-on-methods", "jQuery.fn.unbind() is deprecated" );
[869] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "delegate", function( selector, types, data, fn ) {
[870] Fix | Delete
return this.on( types, selector, data, fn );
[871] Fix | Delete
}, "pre-on-methods", "jQuery.fn.delegate() is deprecated" );
[872] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "undelegate", function( selector, types, fn ) {
[873] Fix | Delete
return arguments.length === 1 ?
[874] Fix | Delete
this.off( selector, "**" ) :
[875] Fix | Delete
this.off( types, selector || "**", fn );
[876] Fix | Delete
}, "pre-on-methods", "jQuery.fn.undelegate() is deprecated" );
[877] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "hover", function( fnOver, fnOut ) {
[878] Fix | Delete
return this.on( "mouseenter", fnOver ).on( "mouseleave", fnOut || fnOver );
[879] Fix | Delete
}, "pre-on-methods", "jQuery.fn.hover() is deprecated" );
[880] Fix | Delete
[881] Fix | Delete
var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,
[882] Fix | Delete
makeMarkup = function( html ) {
[883] Fix | Delete
var doc = window.document.implementation.createHTMLDocument( "" );
[884] Fix | Delete
doc.body.innerHTML = html;
[885] Fix | Delete
return doc.body && doc.body.innerHTML;
[886] Fix | Delete
},
[887] Fix | Delete
warnIfChanged = function( html ) {
[888] Fix | Delete
var changed = html.replace( rxhtmlTag, "<$1></$2>" );
[889] Fix | Delete
if ( changed !== html && makeMarkup( html ) !== makeMarkup( changed ) ) {
[890] Fix | Delete
migrateWarn( "self-closed-tags",
[891] Fix | Delete
"HTML tags must be properly nested and closed: " + html );
[892] Fix | Delete
}
[893] Fix | Delete
};
[894] Fix | Delete
[895] Fix | Delete
/**
[896] Fix | Delete
* Deprecated, please use `jQuery.migrateDisablePatches( "self-closed-tags" )` instead.
[897] Fix | Delete
* @deprecated
[898] Fix | Delete
*/
[899] Fix | Delete
jQuery.UNSAFE_restoreLegacyHtmlPrefilter = function() {
[900] Fix | Delete
jQuery.migrateEnablePatches( "self-closed-tags" );
[901] Fix | Delete
};
[902] Fix | Delete
[903] Fix | Delete
migratePatchFunc( jQuery, "htmlPrefilter", function( html ) {
[904] Fix | Delete
warnIfChanged( html );
[905] Fix | Delete
return html.replace( rxhtmlTag, "<$1></$2>" );
[906] Fix | Delete
}, "self-closed-tags" );
[907] Fix | Delete
[908] Fix | Delete
// This patch needs to be disabled by default as it re-introduces
[909] Fix | Delete
// security issues (CVE-2020-11022, CVE-2020-11023).
[910] Fix | Delete
jQuery.migrateDisablePatches( "self-closed-tags" );
[911] Fix | Delete
[912] Fix | Delete
var origOffset = jQuery.fn.offset;
[913] Fix | Delete
[914] Fix | Delete
migratePatchFunc( jQuery.fn, "offset", function() {
[915] Fix | Delete
var elem = this[ 0 ];
[916] Fix | Delete
[917] Fix | Delete
if ( elem && ( !elem.nodeType || !elem.getBoundingClientRect ) ) {
[918] Fix | Delete
migrateWarn( "offset-valid-elem", "jQuery.fn.offset() requires a valid DOM element" );
[919] Fix | Delete
return arguments.length ? this : undefined;
[920] Fix | Delete
}
[921] Fix | Delete
[922] Fix | Delete
return origOffset.apply( this, arguments );
[923] Fix | Delete
}, "offset-valid-elem" );
[924] Fix | Delete
[925] Fix | Delete
// Support jQuery slim which excludes the ajax module
[926] Fix | Delete
// The jQuery.param patch is about respecting `jQuery.ajaxSettings.traditional`
[927] Fix | Delete
// so it doesn't make sense for the slim build.
[928] Fix | Delete
if ( jQuery.ajax ) {
[929] Fix | Delete
[930] Fix | Delete
var origParam = jQuery.param;
[931] Fix | Delete
[932] Fix | Delete
migratePatchFunc( jQuery, "param", function( data, traditional ) {
[933] Fix | Delete
var ajaxTraditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
[934] Fix | Delete
[935] Fix | Delete
if ( traditional === undefined && ajaxTraditional ) {
[936] Fix | Delete
[937] Fix | Delete
migrateWarn( "param-ajax-traditional",
[938] Fix | Delete
"jQuery.param() no longer uses jQuery.ajaxSettings.traditional" );
[939] Fix | Delete
traditional = ajaxTraditional;
[940] Fix | Delete
}
[941] Fix | Delete
[942] Fix | Delete
return origParam.call( this, data, traditional );
[943] Fix | Delete
}, "param-ajax-traditional" );
[944] Fix | Delete
[945] Fix | Delete
}
[946] Fix | Delete
[947] Fix | Delete
migratePatchAndWarnFunc( jQuery.fn, "andSelf", jQuery.fn.addBack, "andSelf",
[948] Fix | Delete
"jQuery.fn.andSelf() is deprecated and removed, use jQuery.fn.addBack()" );
[949] Fix | Delete
[950] Fix | Delete
// Support jQuery slim which excludes the deferred module in jQuery 4.0+
[951] Fix | Delete
if ( jQuery.Deferred ) {
[952] Fix | Delete
[953] Fix | Delete
var oldDeferred = jQuery.Deferred,
[954] Fix | Delete
tuples = [
[955] Fix | Delete
[956] Fix | Delete
// Action, add listener, callbacks, .then handlers, final state
[957] Fix | Delete
[ "resolve", "done", jQuery.Callbacks( "once memory" ),
[958] Fix | Delete
jQuery.Callbacks( "once memory" ), "resolved" ],
[959] Fix | Delete
[ "reject", "fail", jQuery.Callbacks( "once memory" ),
[960] Fix | Delete
jQuery.Callbacks( "once memory" ), "rejected" ],
[961] Fix | Delete
[ "notify", "progress", jQuery.Callbacks( "memory" ),
[962] Fix | Delete
jQuery.Callbacks( "memory" ) ]
[963] Fix | Delete
];
[964] Fix | Delete
[965] Fix | Delete
migratePatchFunc( jQuery, "Deferred", function( func ) {
[966] Fix | Delete
var deferred = oldDeferred(),
[967] Fix | Delete
promise = deferred.promise();
[968] Fix | Delete
[969] Fix | Delete
function newDeferredPipe( /* fnDone, fnFail, fnProgress */ ) {
[970] Fix | Delete
var fns = arguments;
[971] Fix | Delete
[972] Fix | Delete
return jQuery.Deferred( function( newDefer ) {
[973] Fix | Delete
jQuery.each( tuples, function( i, tuple ) {
[974] Fix | Delete
var fn = typeof fns[ i ] === "function" && fns[ i ];
[975] Fix | Delete
[976] Fix | Delete
// Deferred.done(function() { bind to newDefer or newDefer.resolve })
[977] Fix | Delete
// deferred.fail(function() { bind to newDefer or newDefer.reject })
[978] Fix | Delete
// deferred.progress(function() { bind to newDefer or newDefer.notify })
[979] Fix | Delete
deferred[ tuple[ 1 ] ]( function() {
[980] Fix | Delete
var returned = fn && fn.apply( this, arguments );
[981] Fix | Delete
if ( returned && typeof returned.promise === "function" ) {
[982] Fix | Delete
returned.promise()
[983] Fix | Delete
.done( newDefer.resolve )
[984] Fix | Delete
.fail( newDefer.reject )
[985] Fix | Delete
.progress( newDefer.notify );
[986] Fix | Delete
} else {
[987] Fix | Delete
newDefer[ tuple[ 0 ] + "With" ](
[988] Fix | Delete
this === promise ? newDefer.promise() : this,
[989] Fix | Delete
fn ? [ returned ] : arguments
[990] Fix | Delete
);
[991] Fix | Delete
}
[992] Fix | Delete
} );
[993] Fix | Delete
} );
[994] Fix | Delete
fns = null;
[995] Fix | Delete
} ).promise();
[996] Fix | Delete
}
[997] Fix | Delete
[998] Fix | Delete
migratePatchAndWarnFunc( deferred, "pipe", newDeferredPipe, "deferred-pipe",
[999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function