X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=872bdc99a5b14db696f5ff3a58e8283cb621ea6e;hb=5611eaa4c6fb429da510127364279223ad60e668;hp=dcd5919e6924650a4c99f437454c6a0bf36d0c65;hpb=a92fab2aaba9708297f9d873896256b95ac85498;p=brisk.git diff --git a/web/commons.js b/web/commons.js index dcd5919..872bdc9 100644 --- a/web/commons.js +++ b/web/commons.js @@ -60,6 +60,39 @@ function $(id) { return document.getElementById(id); } throw Error('setInterval Error\nInvalid function type'); }; }; + + /*Copy the default setTimeout behavior*/ + var nativeSetTimeout = window.setTimeout; + window.setTimeout = function(fn,ms) { + var param = []; + if(arguments.length <= 2) { + return nativeSetTimeout(fn,ms); + } + else { + for(var i=2;i