Skip to content

Instantly share code, notes, and snippets.

@kopiro
Created June 9, 2011 12:40
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 kopiro/1016657 to your computer and use it in GitHub Desktop.
Save kopiro/1016657 to your computer and use it in GitHub Desktop.
Scroll down a Facebook profile
javascript:
var class_obj, id, jscc_obj;
function getElementByClass(class_name) {
var els = document.getElementsByTagName('*');
var pattern = new RegExp("(^|\\s)"+class_name+"(\\s|$)");
for (i = 0; i< els.length; i++) {
if (els[i].className!=null && pattern.test(els[i].className)) {
return els[i];
}
}
}
function DownProfile(){
class_obj = getElementByClass('pam uiBoxLightblue uiMorePagerPrimary');
if(class_obj!=null){
id = class_obj.getAttribute('onclick');
id = id.split('\'');
id = id[1];
jscc_obj = JSCC.get(id);
((jscc_obj) && jscc_obj.getHandler())();
window.scrollTo(0,document.height);
} else {
clearInterval(intervalID);
alert('Lo script ha terminato.');
}
}
window.alert("Questo script ̬ stato sviluppato da Flavio De Stefano.\nTutti i diritti riservati.\nPer informazioni visita il sito http://kopiro.it\n\nPremi OK per eseguire lo script.");
var intervalID = window.setInterval(DownProfile, 3000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment