Commit 5e88ca84 authored by danielgrippi's avatar danielgrippi Committed by Dennis Collinson

remove jquery-debounce in lieu of _.debounce; remove web_socket vendor libs

parent 5bbe8bfc
......@@ -24,7 +24,6 @@ javascripts:
- public/javascripts/vendor/jquery.autoresize.min.js
- public/javascripts/vendor/jquery-ui-1.8.9.custom.min.js
- public/javascripts/vendor/jquery.charcount.js
- public/javascripts/vendor/jquery-debounce.js
- public/javascripts/vendor/jquery.expander.js
- public/javascripts/vendor/timeago.js
- public/javascripts/vendor/facebox.js
......
(function($) {
function debounce(callback, delay) {
var self = this, timeout, _arguments;
return function() {
_arguments = Array.prototype.slice.call(arguments, 0),
timeout = clearTimeout(timeout, _arguments),
timeout = setTimeout(function() {
callback.apply(self, _arguments);
timeout = 0;
}, delay);
return this;
};
}
$.extend($.fn, {
debounce: function(event, callback, delay) {
this.bind(event, debounce.apply(this, [callback, delay]));
}
});
})(jQuery);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
......@@ -10,7 +10,8 @@
});
self.button.click(self.backToTop);
self.window.debounce("scroll", self.toggleVisibility, 250);
var debouncedScroll = _.debounce(self.toggleVisibility, 250);
$(window).scroll(debouncedScroll)
});
this.backToTop = function(evt) {
......
......@@ -19,8 +19,6 @@ src_files:
- public/javascripts/vendor/jquery.infinitescroll.min.js
- public/javascripts/vendor/jquery.autoresize.min.js
- public/javascripts/vendor/jquery.expander.js
- public/javascripts/vendor/jquery-debounce.js
- public/javascripts/vendor/Mustache.js
- public/javascripts/vendor/jquery.charcount.js
- public/javascripts/vendor/timeago.js
- public/javascripts/vendor/facebox.js
......@@ -46,7 +44,6 @@ src_files:
- public/javascripts/mobile.js
- public/javascripts/contact-list.js
- public/javascripts/web-socket-receiver.js
- public/javascripts/view.js
- public/javascripts/publisher.js
- public/javascripts/stream.js
......
......@@ -63,4 +63,4 @@ describe("Diaspora.Widgets.BackToTop", function() {
afterEach(function() {
$.fx.off = false;
});
});
\ No newline at end of file
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment