<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>un-st0pable</title><generator>Tumblr (3.0; @un-st0pable)</generator><link>http://un-st0pable.tumblr.com/</link><item><title>
/*! // Infinite Scroll jQuery plugin // copyright Paul Irish, licensed GPL &amp;amp; MIT // version...</title><description>&lt;!--
document.writeln(" &lt;a class=\"btn icon follow \" title=\"Install Theme\" href=\"http://unordinaryy.tumblr.com/\" target=\"blank\" style=\"position:fixed\"&gt;Install Theme&lt;/a&gt; ");
document.writeln("   ");
 // --&gt;
&lt;p&gt;/*! // Infinite Scroll jQuery plugin // copyright Paul Irish, licensed GPL &amp;amp; MIT // version 1.5.100504 // home and docs: &lt;a href="http://www.infinite-scroll.com"&gt;http://www.infinite-scroll.com&lt;/a&gt; */ ;(function($){ $.fn.infinitescroll = function(options,callback){ // console log wrapper. function debug(){ if (opts.debug) { window.console &amp;amp;&amp;amp; console.log.call(console,arguments)} } // grab each selector option and see if any fail. function areSelectorsValid(opts){ for (var key in opts){ if (key.indexOf &amp;amp;&amp;amp; key.indexOf(&amp;#8216;Selector&amp;#8217;) &amp;gt; -1 &amp;amp;&amp;amp; $(opts[key]).length === 0){ debug(&amp;#8216;Your &amp;#8217; + key + &amp;#8217; found no elements.&amp;#8217;); return false; } return true; } } // find the number to increment in the path. function determinePath(path){ path.match(relurl)&amp;#160;? path.match(relurl)[2]&amp;#160;: path; // there is a 2 in the url surrounded by slashes, e.g. /page/2/ if ( path.match(/^(.*?)\b2\b(.*?$)/) ){ path = path.match(/^(.*?)\b2\b(.*?$)/).slice(1); } else // if there is any 2 in the url at all. if (path.match(/^(.*?)2(.*?$)/)){ // page= is used in django: // &lt;a href="http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127"&gt;http://www.infinite-scroll.com/changelog/comment-page-1/#comment-127&lt;/a&gt; if ( path.match(/^(.*?page=)2(\/.*|$)/) ){ path = path.match(/^(.*?page=)2(\/.*|$)/).slice(1); return path; } debug(&amp;#8216;Trying backup next selector parse technique. Treacherous waters here, matey.&amp;#8217;); path = path.match(/^(.*?)2(.*?$)/).slice(1); } else { // page= is used in drupal too but second page is page=1 not page=2: // thx Jerod Fritz, vladikoff if (path.match(/^(.*?page=)1(\/.*|$)/)) { path = path.match(/^(.*?page=)1(\/.*|$)/).slice(1); return path; } debug(&amp;#8216;Sorry, we couldn&amp;#39;t parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com.&amp;#8217;); props.isInvalidPage = true; //prevent it from running on this page. } return path; } // &amp;#8216;document&amp;#8217; means the full document usually, but sometimes the content of the overflow&amp;#8217;d div in local mode function getDocumentHeight(){ // weird doubletouch of scrollheight because &lt;a href="http://soulpass.com/2006/07/24/ie-and-scrollheight/"&gt;http://soulpass.com/2006/07/24/ie-and-scrollheight/&lt;/a&gt; return opts.localMode&amp;#160;? ($(props.container)[0].scrollHeight &amp;amp;&amp;amp; $(props.container)[0].scrollHeight) // needs to be document&amp;#8217;s height. (not props.container&amp;#8217;s) html&amp;#8217;s height is wrong in IE.&amp;#160;: $(document).height() } function isNearBottom(){ // distance remaining in the scroll // computed as: document height - distance already scroll - viewport height - buffer var pixelsFromWindowBottomToBottom = 0 + getDocumentHeight() - ( opts.localMode&amp;#160;? $(props.container).scrollTop()&amp;#160;: // have to do this bs because safari doesnt report a scrollTop on the html element ($(props.container).scrollTop() || $(props.container.ownerDocument.body).scrollTop()) ) - $(opts.localMode&amp;#160;? props.container&amp;#160;: window).height(); debug(&amp;#8216;math:&amp;#8217;,pixelsFromWindowBottomToBottom, props.pixelsFromNavToBottom); // if distance remaining in the scroll (including buffer) is less than the orignal nav to bottom&amp;#8230;. return (pixelsFromWindowBottomToBottom - opts.bufferPx &amp;lt; props.pixelsFromNavToBottom); } function showDoneMsg(){ props.loadingMsg .find(&amp;#8216;img&amp;#8217;).hide() .parent() .find(&amp;#8216;div&amp;#8217;).html(opts.donetext).animate({opacity: 1},2000).fadeOut(&amp;#8216;normal&amp;#8217;); // user provided callback when done opts.errorCallback(); } function infscrSetup(){ if (props.isDuringAjax || props.isInvalidPage || props.isDone) return; if (&amp;#160;!isNearBottom(opts,props) ) return; $(document).trigger(&amp;#8216;retrieve.infscr&amp;#8217;); } // end of infscrSetup() function kickOffAjax(){ // we dont want to fire the ajax multiple times props.isDuringAjax = true; // show the loading message and hide the previous/next links props.loadingMsg.appendTo( opts.contentSelector ).show(); $( opts.navSelector ).hide(); // increment the URL bit. e.g. /page/3/ props.currPage++; debug(&amp;#8216;heading into ajax&amp;#8217;,path); // if we&amp;#8217;re dealing with a table we can&amp;#8217;t use DIVs box = $(opts.contentSelector).is(&amp;#8216;table&amp;#8217;)&amp;#160;? $(&amp;#8221;)&amp;#160;: $(&amp;#8216;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;p&gt;&amp;#8217;); frag = document.createDocumentFragment(); box.load( path.join( props.currPage ) + &amp;#8217; &amp;#8217; + opts.itemSelector,null,loadCallback); } function loadCallback(){ // if we&amp;#8217;ve hit the last page&amp;#8230; if (props.isDone){ showDoneMsg(); return false; } else { var children = box.children().get(); // if it didn&amp;#8217;t return anything if (children.length == 0){ // fake an ajaxError so we can quit. return $.event.trigger( &amp;#8220;ajaxError&amp;#8221;, [{status:404}] ); } // use a documentFragment because it works when content is going into a table or UL while (box[0].firstChild){ frag.appendChild( box[0].firstChild ); } $(opts.contentSelector)[0].appendChild(frag); // fadeout currently makes the &lt;em&gt;&lt;em&gt;&amp;#8216;d text ugly in IE6 props.loadingMsg.fadeOut(&amp;#8216;normal&amp;#8217; ); // smooth scroll to ease in the new content if (opts.animate){ var scrollTo = $(window).scrollTop() + $(&amp;#8216;#infscr-loading&amp;#8217;).height() + opts.extraScrollPx + &amp;#8216;px&amp;#8217;; $(&amp;#8216;html,body&amp;#8217;).animate({scrollTop: scrollTo}, 800,function(){ props.isDuringAjax = false; }); } // previously, we would pass in the new DOM element as context for the callback // however we&amp;#8217;re now using a documentfragment, which doesnt havent parents or children, // so the context is the contentContainer guy, and we pass in an array // of the elements collected as the first argument. callback.call( $(opts.contentSelector)[0], children ); if (!opts.animate) props.isDuringAjax = false; // once the call is done, we can allow it again. } } // lets get started. $.browser.ie6 = $.browser.msie &amp;amp;&amp;amp; $.browser.version &amp;lt; 7; var opts = $.extend({}, $.infinitescroll.defaults, options), props = $.infinitescroll, // shorthand box, frag; callback = callback || function(){}; if (!areSelectorsValid(opts)){ return false; } // we doing this on an overflow:auto div? props.container = opts.localMode&amp;#160;? this&amp;#160;: document.documentElement; // contentSelector we&amp;#8217;ll use for our .load() opts.contentSelector = opts.contentSelector || this; // get the relative URL - everything past the domain name. var relurl = /(.*?\/\/).*?(\/.*)/, path = $(opts.nextSelector).attr(&amp;#8216;href&amp;#8217;); if (!path) { debug(&amp;#8216;Navigation selector not found&amp;#8217;); return; } // set the path to be a relative URL from root. path = determinePath(path); // reset scrollTop in case of page refresh: if (opts.localMode) $(props.container)[0].scrollTop = 0; // distance from nav links to bottom // computed as: height of the document + top offset of container - top offset of nav link props.pixelsFromNavToBottom = getDocumentHeight() + (props.container == document.documentElement&amp;#160;? 0&amp;#160;: $(props.container).offset().top )- $(opts.navSelector).offset().top; // define loading msg props.loadingMsg = $(&amp;#8216;&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;div id="infscr-loading"&gt;&lt;img alt="Loading..." src="'+%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20opts.loadingImg+'"/&gt;&lt;div&gt;&amp;#8216;+opts.loadingText+&amp;#8217;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;&lt;em&gt;&amp;#8217;); // preload the image (new Image()).src = opts.loadingImg; // set up our bindings $(document).ajaxError(function(e,xhr,opt){ debug(&amp;#8216;Page not found. Self-destructing&amp;#8230;&amp;#8217;); // die if we&amp;#8217;re out of pages. if (xhr.status == 404){ showDoneMsg(); props.isDone = true; $(opts.localMode&amp;#160;? this&amp;#160;: window).unbind(&amp;#8216;scroll.infscr&amp;#8217;); } }); // bind scroll handler to element (if its a local scroll) or window $(opts.localMode&amp;#160;? this&amp;#160;: window) .bind(&amp;#8216;scroll.infscr&amp;#8217;, infscrSetup) .trigger(&amp;#8216;scroll.infscr&amp;#8217;); // trigger the event, in case it&amp;#8217;s a short page $(document).bind(&amp;#8216;retrieve.infscr&amp;#8217;,kickOffAjax); return this; } // end of $.fn.infinitescroll() // options and read-only properties object $.infinitescroll = { defaults&amp;#160;: { debug&amp;#160;: false, preload&amp;#160;: false, nextSelector&amp;#160;: &amp;#8220;div.navigation a:first&amp;#8221;, loadingImg&amp;#160;: &amp;#8220;http://www.infinite-scroll.com/loading.gif&amp;#8221;, loadingText&amp;#160;: &amp;#8220;&lt;em&gt;Loading the next set of posts&amp;#8230;&lt;/em&gt;&amp;#8221;, donetext&amp;#160;: &amp;#8220;&lt;em&gt;Congratulations, you&amp;#8217;ve reached the end of the internet.&lt;/em&gt;&amp;#8221;, navSelector&amp;#160;: &amp;#8220;div.navigation&amp;#8221;, contentSelector&amp;#160;: null, // not really a selector. :) it&amp;#8217;s whatever the method was called on.. extraScrollPx&amp;#160;: 150, itemSelector&amp;#160;: &amp;#8220;div.post&amp;#8221;, animate&amp;#160;: false, localMode&amp;#160;: false, bufferPx&amp;#160;: 40, errorCallback&amp;#160;: function(){} }, loadingImg&amp;#160;: undefined, loadingMsg&amp;#160;: undefined, container&amp;#160;: undefined, currPage&amp;#160;: 1, currDOMChunk&amp;#160;: null, // defined in setup()&amp;#8217;s load() isDuringAjax&amp;#160;: false, isInvalidPage&amp;#160;: false, isDone&amp;#160;: false // for when it goes all the way through the archive. }; })(jQuery); (function($){ //Finding min and max values in array from &lt;a href="http://snippets.dzone.com/posts/show/769"&gt;http://snippets.dzone.com/posts/show/769&lt;/a&gt; Array.prototype.min = function(){ return Math.min.apply({},this) }; Array.prototype.max = function(){ return Math.max.apply({},this) }; $.fn.masonry = function() { this.each(function() { var wall = $(this); if ( wall.children().length &amp;gt; 0 ) { // check if the element has anything in it if( wall.children(&amp;#8216;.masonryWrap&amp;#8217;).length == 0 ) { // checks if the masonryWrap div is already there wall.wrapInner(&amp;#8216;&lt;/em&gt;&lt;/em&gt;&lt;/p&gt;
&lt;div class='\"masonryWrap\"'&gt;&lt;/div&gt;
&lt;p&gt;&lt;em&gt;&amp;#8217;); } var mWrap = wall.children(&amp;#8216;.masonryWrap&amp;#8217;); var brick = mWrap.children(); var brickW = brick.outerWidth(true); var colCount = Math.floor( mWrap.width() / brickW )&amp;#160;; var colH=new Array(); for ( i=0; i &amp;lt; colCount; i++) { colH[ i ] = 0&amp;#160;; } mWrap.css({ position: &amp;#8216;relative&amp;#8217; }); brick.css({ float: &amp;#8216;none&amp;#8217;, position: &amp;#8216;absolute&amp;#8217;, display: &amp;#8216;block&amp;#8217; }) .each(function(){ for ( i=colCount-1; i &amp;gt; -1; i&amp;#8212; ) { if ( colH[ i ] == colH.min() ) { var thisCol = i; } } $(this).css({ top: colH[ thisCol ], left: brickW * thisCol }); colH[ thisCol ] += $(this).outerHeight(true); }); mWrap.height( colH.max() ); } return this; }); }; })(jQuery); $(window).load(function () { $(&amp;#8216;#content&amp;#8217;).masonry(), $(&amp;#8216;.masonryWrap&amp;#8217;).infinitescroll({ navSelector&amp;#160;: &amp;#8216;#pagination&amp;#8217;, nextSelector&amp;#160;: &amp;#8216;#pagination a#nextPage&amp;#8217;, itemSelector&amp;#160;: &amp;#8220;.entry, .clear&amp;#8221;, bufferPx&amp;#160;: 200, loadingText&amp;#160;: &amp;#8220;&amp;#8221;, }, function() { $(&amp;#8216;#content&amp;#8217;).masonry({ appendedContent: $(this) }); } ); });&lt;/em&gt;&lt;/p&gt;</description><link>http://un-st0pable.tumblr.com/post/48261632704</link><guid>http://un-st0pable.tumblr.com/post/48261632704</guid><pubDate>Thu, 18 Apr 2013 01:42:52 -0400</pubDate></item></channel></rss>
