Initial commit

This commit is contained in:
Ben Goldsworthy 2017-01-12 23:10:07 +00:00
commit 28e6ddf404
1083 changed files with 191734 additions and 0 deletions

View file

@ -0,0 +1,20 @@
/*
--------------------------------
Infinite Scroll Behavior
Cufon Refresh
--------------------------------
+ https://github.com/paulirish/infinitescroll/
+ version 2.0b2.110617
+ Copyright 2011 Paul Irish & Luke Shumard
+ Licensed under the MIT license
+ Documentation: http://infinite-scroll.com/
*/
(function ($, undefined) {
$.extend($.infinitescroll.prototype,{
_callback_cufon: function infscr_callback_cufon(newElements) {
Cufon.refresh(newElements);
}
});
})(jQuery);

View file

@ -0,0 +1,26 @@
// Calculate internal height (used for local scroll)
// this function is from the old localMode I think?
function infsrc_local_hiddenHeight(element) {
var height = 0;
jQuery(element).children().each(function() {
height = height + jQuery(this).outerHeight(false);
});
return height;
}
jQuery.extend(jQuery.infinitescroll.prototype,{
_nearbottom_local: function infscr_nearbottom_local() {
var opts = this.options, instance = this,
pixelsFromWindowBottomToBottom = infsrc_local_hiddenHeight(opts.binder)
- jQuery(opts.binder).scrollTop() - jQuery(opts.binder).height();
if (opts.local_pixelsFromNavToBottom == undefined){
opts.local_pixelsFromNavToBottom = infsrc_local_hiddenHeight(opts.binder) +
jQuery(opts.binder).offset().top - jQuery(opts.navSelector).offset().top;
}
instance._debug('local math:', pixelsFromWindowBottomToBottom,
opts.local_pixelsFromNavToBottom);
return (pixelsFromWindowBottomToBottom - opts.bufferPx < opts.local_pixelsFromNavToBottom);
}
});

View file

@ -0,0 +1,61 @@
/*
--------------------------------
Infinite Scroll Behavior
Manual / Twitter-style
--------------------------------
+ https://github.com/paulirish/infinitescroll/
+ version 2.0b2.110617
+ Copyright 2011 Paul Irish & Luke Shumard
+ Licensed under the MIT license
+ Documentation: http://infinite-scroll.com/
*/
(function($, undefined) {
$.extend($.infinitescroll.prototype,{
_setup_twitter: function infscr_setup_twitter () {
var opts = this.options,
instance = this;
// Bind nextSelector link to retrieve
$(opts.nextSelector).click(function(e) {
if (e.which == 1 && !e.metaKey && !e.shiftKey) {
e.preventDefault();
instance.retrieve();
}
});
// Define loadingStart to never hide pager
instance.options.loading.start = function (opts) {
opts.loading.msg
.appendTo(opts.loading.selector)
.show(opts.loading.speed, function () {
instance.beginAjax(opts);
});
}
},
_showdonemsg_twitter: function infscr_showdonemsg_twitter () {
var opts = this.options,
instance = this;
//Do all the usual stuff
opts.loading.msg
.find('img')
.hide()
.parent()
.find('div').html(opts.loading.finishedMsg).animate({ opacity: 1 }, 2000, function () {
$(this).parent().fadeOut('normal');
});
//And also hide the navSelector
$(opts.navSelector).fadeOut('normal');
// user provided callback when done
opts.errorCallback.call($(opts.contentSelector)[0],'done');
}
});
})(jQuery);

View file

@ -0,0 +1,21 @@
/*
--------------------------------
Infinite Scroll Behavior
Masonry Integration
--------------------------------
+ https://github.com/paulirish/infinitescroll/
+ version 2.0b2.110617
+ Copyright 2011 Paul Irish & Luke Shumard
+ Licensed under the MIT license
+ Documentation: http://infinite-scroll.com/
*/
(function($, undefined) {
$.extend($.infinitescroll.prototype,{
_callback_masonry: function infscr_callback_masonry (newElements) {
$(this).masonry('appended',$(newElements));
}
});
})(jQuery);

View file

@ -0,0 +1,19 @@
/*
--------------------------------
Infinite Scroll Behavior
Sausage.js Integration
--------------------------------
+ https://github.com/paulirish/infinitescroll/
+ version 2.0b2.110617
+ Copyright 2011 Paul Irish & Luke Shumard
+ Licensed under the MIT license
+ Documentation: http://infinite-scroll.com/
*/
(function($, undefined) {
$.extend($.infinitescroll.prototype,{
// TODO: Implement
});
})(jQuery);