Skip to content

Instantly share code, notes, and snippets.

@dmadisetti
Created December 26, 2016 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmadisetti/cfaccde928da6b6e1b4c69944dc45985 to your computer and use it in GitHub Desktop.
Save dmadisetti/cfaccde928da6b6e1b4c69944dc45985 to your computer and use it in GitHub Desktop.
(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