Created
June 29, 2012 14:09
-
-
Save danscotton/3018168 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -- changed lines | |
| return { | |
| init: function() { | |
| // store DOM references | |
| var hyperpuff = news.$('.hyperpuff'), | |
| hyperTitleText = news.$('.hyper-title', hyperpuff).text(), | |
| firstGroupArticles = news.$('.group:first-child .article-wrapper article', hyperpuff), | |
| insertBeforeTarget = news.$('.story-body .introduction'), | |
| -- articleHTML = document.createElement('div'); | |
| if(hyperpuff.length) { | |
| for(var i = 0, len = numMiniHyperpuffStories; i < len; i++) { | |
| -- articleHTML.appendChild(firstGroupArticles[i].cloneNode(true)); | |
| } | |
| if(insertBeforeTarget.length) { | |
| -- insertBeforeTarget.before( interpolate(hyperTitleText, articleHTML.innerHTML) ); | |
| } | |
| } | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment