(function($){ $.resizeend = function(el, options){ var base = this; base.$el = $(el); base.el = el; base.$el.data("resizeend", base); base.rtime = new Date(1, 1, 2000, 12,00,00); base.timeout = false; base.delta = 200; base.init = function(){ base.options = $.extend({},$.resizeend.defaultOptions, options); if(base.options.runOnStart) base.options.onDragEnd(); $(base.el).resize(function() { base.rtime = new Date(); if (base.timeout === false) { base.timeout = true; setTimeout(base.resizeend, base.delta); } }); }; base.resizeend = function() { if (new Date() - base.rtime < base.delta) { setTimeout(base.resizeend, base.delta); } else { base.timeout = false; base.options.onDragEnd(); } }; base.init(); }; $.resizeend.defaultOptions = { onDragEnd : function() {}, runOnStart : false }; $.fn.resizeend = function(options){ return this.each(function(){ (new $.resizeend(this, options)); }); }; })(jQuery); /* playback timings (ms): LoadShardBlock: 181.998 (3) esindex: 0.006 captures_list: 205.498 CDXLines.iter: 16.694 (3) PetaboxLoader3.datanode: 243.326 (5) exclusion.robots: 0.18 exclusion.robots.policy: 0.165 RedisCDXSource: 2.866 PetaboxLoader3.resolve: 837.594 (2) load_resource: 923.203 */