From 04d6d5ca99ebfd1cebb8ce06618fb3811fc1a8aa Mon Sep 17 00:00:00 2001 From: Charles Date: Thu, 9 Jan 2020 10:55:03 +0100 Subject: phpmyadmin working --- .../js/vendor/jquery/jquery.debounce-1.0.5.js | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 srcs/phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.5.js (limited to 'srcs/phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.5.js') diff --git a/srcs/phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.5.js b/srcs/phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.5.js new file mode 100644 index 0000000..020128c --- /dev/null +++ b/srcs/phpmyadmin/js/vendor/jquery/jquery.debounce-1.0.5.js @@ -0,0 +1,71 @@ +/** + * Debounce and throttle function's decorator plugin 1.0.5 + * + * 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 : 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 : function(fn, timeout, ctx) { + + var timer, args, needInvoke; + + return function() { + + args = arguments; + needInvoke = true; + ctx = ctx || this; + + if(!timer) { + (function() { + if(needInvoke) { + fn.apply(ctx, args); + needInvoke = false; + timer = setTimeout(arguments.callee, timeout); + } + else { + timer = null; + } + })(); + } + + }; + + } + +}); + +})(jQuery); \ No newline at end of file -- cgit