Skip to content

Instantly share code, notes, and snippets.

@danscotton
Created June 29, 2012 14:09
Show Gist options
  • Select an option

  • Save danscotton/3018168 to your computer and use it in GitHub Desktop.

Select an option

Save danscotton/3018168 to your computer and use it in GitHub Desktop.
// -- 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