Skip to content

Instantly share code, notes, and snippets.

@fawkeswei
Created August 2, 2011 18:32
Show Gist options
  • Save fawkeswei/1120846 to your computer and use it in GitHub Desktop.
Save fawkeswei/1120846 to your computer and use it in GitHub Desktop.
invite all friends
javascript:%20var%20fbb_ul%20=%200;%20var%20fbb_li%20=%200;%20var%20ok_ul%20=%200;%20var%20ok_li%20=%200;%20var%20ok_count%20=%200;%20var%20fbb_count%20=%200;%20var%20fbb_elms%20%20=%20document.getElementsByName(%20'checkableitems[]'%20);%20var%20fbb_list%20=%20fbb_elms[0].parentNode.parentNode;%20var%20fbb_div%20=%20fbb_list.parentNode;%20var%20fbb_scroll%20=%20fbb_div.parentNode;%20var%20fbb_continue%20=%20true;%20var%20fbb_prev%20=%200;%20var%20fbb_top%20=%200;%20function%20fbb_click()%20{%20var%20click_force%20=%20false;%20if(ok_count%20<%20fbb_count)%20{%20setTimeout('fbb_click()',%2010);%20}%20else%20{%20while(fbb_div.childNodes[fbb_ul]%20&&%20!click_force)%20{%20fbb_list%20=%20fbb_div.childNodes[fbb_ul];%20while(%20fbb_list.childNodes[fbb_li]%20&&%20!click_force%20)%20{%20node%20=%20fbb_list.childNodes[fbb_li].childNodes[0];%20if(%20!node.checked%20&&%20!node.disabled%20)%20setTimeout(%20'fbb_div.childNodes['+fbb_ul+'].childNodes['%20+%20fbb_li%20+%20'].childNodes[0].click();',%200%20);%20fbb_count%20=%20fbb_count%20+%201;%20fbb_li%20=%20fbb_li%20+%201;%20if((fbb_count%20%%206)%20==%200)%20{%20if((fbb_count%20%%2024)%20==%200)%20{%20fbb_scroll.scrollTop%20=%20fbb_top;%20}%20fbb_top%20=%20node.offsetTop%20+%20node.offsetHeight;%20setTimeout('fbb_click()',%20200);%20click_force%20=%20true;%20}%20}%20if(!click_force)%20{%20fbb_li%20=%200;%20fbb_ul%20=%20fbb_ul%20+%201;%20}%20}%20}%20}%20function%20fbb_check()%20{%20var%20check_force%20=%20false;%20while(fbb_div.childNodes[ok_ul]%20&&%20!check_force)%20{%20ok_fbb_list%20=%20fbb_div.childNodes[ok_ul];%20while(ok_fbb_list.childNodes[ok_li]%20&&%20!check_force)%20{%20ok_node%20=%20ok_fbb_list.childNodes[ok_li].childNodes[0];%20if(%20ok_node.checked%20||%20ok_node.disabled%20)%20{%20ok_li%20=%20ok_li%20+%201;%20ok_count%20=%20ok_count%20+%201;%20document.title%20=%20'Seleccionados:%20'%20+%20ok_count;%20}%20else%20{%20setTimeout('fbb_check()',%20200);%20check_force%20=%20true;%20}%20}%20if(!check_force)%20{%20ok_li%20=%200;%20ok_ul%20=%20ok_ul%20+%201;%20}%20}%20}%20fbb_check();%20fbb_click();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment