diff options
| author | Jules Laplace <jules@okfoc.us> | 2012-12-29 23:33:01 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2012-12-29 23:33:01 -0500 |
| commit | 00404603de74e15ba916898d1f3d9f8cda8400ad (patch) | |
| tree | e47f5a66047bc2608c55685662e5787f3c0521dd /static/js/src/util.js | |
| parent | 064860c2948c19b967e15baf081daed93d77e7b8 (diff) | |
| parent | c422e5bead4dd4ed9da274947df8edfb473537ea (diff) | |
Merge branch 'master' of dumpfm:/pichat/repo
Diffstat (limited to 'static/js/src/util.js')
| -rw-r--r-- | static/js/src/util.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/static/js/src/util.js b/static/js/src/util.js index fdfd1c9..814c81b 100644 --- a/static/js/src/util.js +++ b/static/js/src/util.js @@ -78,3 +78,15 @@ function timeFunc(f){ // console.log((new Date().getTime()) - start + " msecs"); return res; } + +window.requestAnimFrame = (function(){ + return window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame || + function( callback ){ + window.setTimeout(callback, 1000 / 60); + }; +})(); + |
