Skip to content

Instantly share code, notes, and snippets.

@kcrwfrd
Created May 30, 2012 05:24
Show Gist options
  • Save kcrwfrd/2833933 to your computer and use it in GitHub Desktop.
Save kcrwfrd/2833933 to your computer and use it in GitHub Desktop.
FB Invite
javascript:
var jq = '';
var myInit = function(){
jq = document.createElement('script'); jq.type = 'text/javascript'; jq.async = false;
jq.src = '//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js';
document.getElementsByTagName('head')[0].appendChild(jq);
}();
jq.addEventListener('load', function(e){
var panes = $('div.lists > div.scrollable');
var pane = panes[panes.length-1];
var height = $(pane).height();
var i = 1;
var iScroll = window.setInterval(function(){
var newHeight = height * i;
$(pane).scrollTop(newHeight);
var curr = $(pane).scrollTop();
if((curr + 1000) < newHeight){
clearInterval(iScroll);
elms=document.getElementsByName('checkableitems[]');
for (i=0;i<elms.length;i++){
if (elms[i].type='checkbox' )
elms[i].click();
}
}
i++;
}, 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment