Server IP : 51.89.169.208 / Your IP : 18.224.93.225 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/phpMyAdmin/js/vendor/jquery/ |
Upload File : |
/** * Debounce and throttle function's decorator plugin 1.0.6 * * Copyright (c) 2009 Filatov Dmitry (alpha@zforms.ru) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php * http://www.gnu.org/licenses/gpl.html * */ (function ($) { $.extend({ /** * Debounce's decorator * @param {Function} fn original function * @param {Number} timeout timeout * @param {Boolean} [invokeAsap=false] invoke function as soon as possible * @param {Object} [ctx] context of original function */ debounce: function (fn, timeout, invokeAsap, ctx) { if (arguments.length == 3 && typeof invokeAsap != 'boolean') { ctx = invokeAsap; invokeAsap = false; } var timer; return function () { var args = arguments; ctx = ctx || this; invokeAsap && !timer && fn.apply(ctx, args); clearTimeout(timer); timer = setTimeout(function () { invokeAsap || fn.apply(ctx, args); timer = null; }, timeout); }; }, /** * Throttle's decorator * @param {Function} fn original function * @param {Number} timeout timeout * @param {Object} [ctx] context of original function */ throttle: function (fn, timeout, ctx) { var timer, args, needInvoke; return function () { args = arguments; needInvoke = true; ctx = ctx || this; timer || (function () { if (needInvoke) { fn.apply(ctx, args); needInvoke = false; timer = setTimeout(arguments.callee, timeout); } else { timer = null; } })(); }; } }); })(jQuery);