Instantly share code, notes, and snippets.

Embed
What would you like to do?
(function(){
var parse = function(){
var pagelet = document.getElementById('pagelet_timeline_medley_friends');
var text = "";
var snippets=pagelet.innerText.replace(/,/g,'').match(/[0-9]+ friends/g);
for(var i in snippets){
text += parseInt(snippets[i]) + ",\n";
}
console.log(text);
}
var scroller = function(){
var body = document.body,
html = document.documentElement;
var height = Math.max( body.scrollHeight, body.offsetHeight,
html.clientHeight, html.scrollHeight, html.offsetHeight );
window.scrollTo(0,height);
if(document.getElementById("pagelet_timeline_medley_following") == null){
setTimeout(scroller, 100);
}else{
parse();
}
}
scroller();
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment