vendor: 1,059 bytes, lines 1-34
1/** 2 * Request Animation Frame Polyfill. 3 * @author Tino Zijdel 4 * @author Paul Irish 5 * @see https://gist.github.com/paulirish/1579671 6 */ 7;(function() { 8 9 var lastTime = 0; 10 var vendors = ['ms', 'moz', 'webkit', 'o']; 11 12 for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { 13 window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; 14 window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; 15 } 16 17 if (!window.requestAnimationFrame) { 18 window.requestAnimationFrame = function(callback, element) { 19 var currTime = new Date().getTime(); 20 var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 21 var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 22 timeToCall); 23 lastTime = currTime + timeToCall; 24 return id; 25 }; 26 } 27 28 if (!window.cancelAnimationFrame) { 29 window.cancelAnimationFrame = function(id) { 30 clearTimeout(id); 31 }; 32 } 33 34}());
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.