summaryrefslogtreecommitdiffstatshomepage
path: root/wp-includes/js/jquery/jquery.schedule.js
diff options
context:
space:
mode:
authorAndrew Nacin <nacin@git.wordpress.org>2013-08-07 05:25:25 +0000
committerAndrew Nacin <nacin@git.wordpress.org>2013-08-07 05:25:25 +0000
commitb43712e0f79a9f5bea52217e06155e2f471c490c (patch)
tree23d331e7b2f29689571f03cfa5f9b7b3b6cafab8 /wp-includes/js/jquery/jquery.schedule.js
parent5bbd08e1d17079a2e852517351f7405884a156b3 (diff)
downloadwordpress-b43712e0f79a9f5bea52217e06155e2f471c490c.tar.gz
wordpress-b43712e0f79a9f5bea52217e06155e2f471c490c.zip
New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory. * New task runner (Grunt), configured to copy a built WordPress to build/. * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js. * Remove Akismet external from develop.svn. Still exists in core.svn. * Drop minified files from src/. The build process will now generate these. props koop. see #24976. and see http://wp.me/p2AvED-1AI. git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
Diffstat (limited to 'wp-includes/js/jquery/jquery.schedule.js')
-rw-r--r--wp-includes/js/jquery/jquery.schedule.js36
1 files changed, 0 insertions, 36 deletions
diff --git a/wp-includes/js/jquery/jquery.schedule.js b/wp-includes/js/jquery/jquery.schedule.js
deleted file mode 100644
index f00e7b39e5..0000000000
--- a/wp-includes/js/jquery/jquery.schedule.js
+++ /dev/null
@@ -1,36 +0,0 @@
-
-(function($){$.scheduler=function(){this.bucket={};return;};$.scheduler.prototype={schedule:function(){var ctx={"id":null,"time":1000,"repeat":false,"protect":false,"obj":null,"func":function(){},"args":[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""));};var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++;}
-if(typeof arguments[i]=="object"){for(var option in arguments[i])
-if(typeof ctx[option]!="undefined")
-ctx[option]=arguments[i][option];i++;}
-if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$"))))
-ctx["time"]=arguments[i++];if(typeof arguments[i]=="boolean")
-ctx["repeat"]=arguments[i++];if(typeof arguments[i]=="boolean")
-ctx["protect"]=arguments[i++];if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx["obj"]=arguments[i++];ctx["func"]=arguments[i++];}
-else if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string"))
-ctx["func"]=arguments[i++];while(typeof arguments[i]!="undefined")
-ctx["args"].push(arguments[i++]);if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0])
-if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined")
-ctx[option]=arguments[0][option];}
-else{for(var option in arguments[0])
-if(typeof ctx[option]!="undefined")
-ctx[option]=arguments[0][option];}
-i++;}
-ctx["_scheduler"]=this;ctx["_handle"]=null;var match=String(ctx["time"]).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined")
-ctx["time"]=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]]);if(ctx["id"]==null)
-ctx["id"]=(String(ctx["repeat"])+":"
-+String(ctx["protect"])+":"
-+String(ctx["time"])+":"
-+String(ctx["obj"])+":"
-+String(ctx["func"])+":"
-+String(ctx["args"]));if(ctx["protect"])
-if(typeof this.bucket[ctx["id"]]!="undefined")
-return this.bucket[ctx["id"]];if(!_isfn(ctx["func"])){if(ctx["obj"]!=null&&typeof ctx["obj"]=="object"&&typeof ctx["func"]=="string"&&_isfn(ctx["obj"][ctx["func"]]))
-ctx["func"]=ctx["obj"][ctx["func"]];else
-ctx["func"]=eval("function () { "+ctx["func"]+" }");}
-ctx["_handle"]=this._schedule(ctx);this.bucket[ctx["id"]]=ctx;return ctx;},reschedule:function(ctx){if(typeof ctx=="string")
-ctx=this.bucket[ctx];ctx["_handle"]=this._schedule(ctx);return ctx;},_schedule:function(ctx){var trampoline=function(){var obj=(ctx["obj"]!=null?ctx["obj"]:ctx);(ctx["func"]).apply(obj,ctx["args"]);if(typeof(ctx["_scheduler"]).bucket[ctx["id"]]!="undefined"&&ctx["repeat"])
-(ctx["_scheduler"])._schedule(ctx);else
-delete(ctx["_scheduler"]).bucket[ctx["id"]];};return setTimeout(trampoline,ctx["time"]);},cancel:function(ctx){if(typeof ctx=="string")
-ctx=this.bucket[ctx];if(typeof ctx=="object"){clearTimeout(ctx["_handle"]);delete this.bucket[ctx["id"]];}}};$.extend({scheduler$:new $.scheduler(),schedule:function(){return $.scheduler$.schedule.apply($.scheduler$,arguments)},reschedule:function(){return $.scheduler$.reschedule.apply($.scheduler$,arguments)},cancel:function(){return $.scheduler$.cancel.apply($.scheduler$,arguments)}});$.fn.extend({schedule:function(){var a=[{}];for(var i=0;i<arguments.length;i++)
-a.push(arguments[i]);return this.each(function(){a[0]={"id":this,"obj":this};return $.schedule.apply($,a);});}});})(jQuery); \ No newline at end of file