vendor: 1,908 bytes, lines 1-68
1/*! 2 * jQuery throttle / debounce - v1.1 - 3/7/2010 3 * http://benalman.com/projects/jquery-throttle-debounce-plugin/ 4 * 5 * Copyright (c) 2010 "Cowboy" Ben Alman 6 * Dual licensed under the MIT and GPL licenses. 7 * http://benalman.com/about/license/ 8 */ 9 10(function(window,undefined){ 11 /* Used by YUI compressor.*/ 12 '$:nomunge'; 13 14 var $ = window.jQuery || window.Cowboy || ( window.Cowboy = {} ), 15 jq_throttle; 16 17 $.throttle = jq_throttle = function( delay, no_trailing, callback, debounce_mode ) { 18 var timeout_id, 19 last_exec = 0; 20 21 if ( typeof no_trailing !== 'boolean' ) { 22 debounce_mode = callback; 23 callback = no_trailing; 24 no_trailing = undefined; 25 } 26 27 function wrapper() { 28 var that = this, 29 elapsed = +new Date() - last_exec, 30 args = arguments; 31 32 function exec() { 33 last_exec = +new Date(); 34 callback.apply( that, args ); 35 }; 36 37 function clear() { 38 timeout_id = undefined; 39 }; 40 41 if ( debounce_mode && !timeout_id ) { 42 exec(); 43 } 44 45 timeout_id && clearTimeout( timeout_id ); 46 47 if ( debounce_mode === undefined && elapsed > delay ) { 48 exec(); 49 50 } else if ( no_trailing !== true ) { 51 timeout_id = setTimeout( debounce_mode ? clear : exec, debounce_mode === undefined ? delay - elapsed : delay ); 52 } 53 }; 54 55 if ( $.guid ) { 56 wrapper.guid = callback.guid = callback.guid || $.guid++; 57 } 58 59 return wrapper; 60 }; 61 62 $.debounce = function( delay, at_begin, callback ) { 63 return callback === undefined 64 ? jq_throttle( delay, at_begin, false ) 65 : jq_throttle( delay, callback, at_begin !== false ); 66 }; 67 68})(this);
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.