From c422e5bead4dd4ed9da274947df8edfb473537ea Mon Sep 17 00:00:00 2001 From: dumpfmprod Date: Sat, 29 Dec 2012 23:32:23 -0500 Subject: reg open/closed html --- static/js/src/util.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'static/js/src') 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); + }; +})(); + -- cgit v1.2.3-70-g09d2