vendor: 1,280 bytes, lines 1-32
1// http://paulirish.com/2011/requestanimationframe-for-smart-animating/ 2// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating 3 4// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel 5 6// MIT license 7 8(function() { 9 "use strict"; 10 var lastTime = 0; 11 var vendors = ['ms', 'moz', 'webkit', 'o']; 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'] 15 || window[vendors[x]+'CancelRequestAnimationFrame']; 16 } 17 18 if (!window.requestAnimationFrame) 19 window.requestAnimationFrame = function(callback, element) { 20 var currTime = new Date().getTime(); 21 var timeToCall = Math.max(0, 16 - (currTime - lastTime)); 22 var id = window.setTimeout(function() { callback(currTime + timeToCall); }, 23 timeToCall); 24 lastTime = currTime + timeToCall; 25 return id; 26 }; 27 28 if (!window.cancelAnimationFrame) 29 window.cancelAnimationFrame = function(id) { 30 clearTimeout(id); 31 }; 32}());
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.