InfiniteScroll#options doesn't need to be a function

This commit is contained in:
Raphael Sofaer 2011-05-03 14:54:49 -07:00
parent 89ec768d06
commit abde3244b5

View file

@ -5,8 +5,8 @@
(function() {
var InfiniteScroll = function() { };
InfiniteScroll.prototype.options = function(){
return {
InfiniteScroll.prototype.options =
{
navSelector : "#pagination",
nextSelector : ".paginate",
itemSelector : ".stream_element",
@ -21,7 +21,6 @@
loadingText: "",
loadingImg: '/images/ajax-loader.gif'
};
};
InfiniteScroll.prototype.reInitialize = function(){
this.clear();
@ -30,7 +29,7 @@
InfiniteScroll.prototype.initialize = function(){
if($('#main_stream').length !== 0){
$('#main_stream').infinitescroll(this.options(), function() {
$('#main_stream').infinitescroll(this.options, function() {
Diaspora.widgets.publish("stream/scrolled");
});
}