Skip to content

Instantly share code, notes, and snippets.

View kopiro's full-sized avatar

Flavio Maria De Stefano kopiro

View GitHub Profile
@kopiro
kopiro / jft-event-select-all-friends-async.js
Created June 9, 2011 11:41
Select all friends in a event Facebook page (Async)
javascript:
var _f = document.getElementsByName("checkableitems[]");
var _i = 0;
var _t = setInterval(function(){
if (_i>=_f.length) clearInterval(_t);
try { _f[_i++].click() }
catch (e) { console.dir(e); }
}, 1);
@kopiro
kopiro / jft-event-select-all-friends.js
Created June 9, 2011 11:45
Select all friends in a event Facebook page
javascript:
var _f = document.getElementsByName("checkableitems[]");
for (_i=0; _i<_f.length; _i++) {
try { _f[_i].click() }
catch (e) { console.dir(e); }
}
@kopiro
kopiro / jft-page-suggest-select-all-friends.js
Created June 9, 2011 11:54
Suggest a Facebook page to all friends
javascript:
document.getElementById("social_graph_invite_iframe").contentWindow.fs.select_all();
@kopiro
kopiro / encript-char-string.js
Created June 9, 2011 12:00
Encrypt in ASCII a string in javascript
javascript:
var s = prompt();
var scoded="String.fromCharCode("; for(var i=0;i<s.length; i++) {
scoded+=s.charCodeAt(i);
if (i<s.length-1) scoded+=",";
}
scoded+=");";
alert(scoded);
@kopiro
kopiro / facebook-findfriends-mailist.js
Created June 9, 2011 12:00
Create a Mailist from Facebook findfriends browser
javascript:
var dom = prompt("Insert domain name:","@domain.com");
var names = new Array();
var email = new Array();
var divs = document.getElementsByClassName("friend_browser_page_name_box");
for(i=0;i<divs.length;i++) names.push(divs[i].children[0].children[0].innerText);
for(i=0;i<names.length;i++) {
var cs = names[i].split(" ");
if (cs.length==2) {
email.push(cs[0]+"."+cs[1]);
@kopiro
kopiro / jft-infinite-chat-msgs.js
Created June 9, 2011 12:02
Send infinite chat messages to your Facebook friend (enc)
javascript:eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('o:p 3(){2 7=q()+1;2 8=r.9();2 s=b t().9();2 c={u:7,v:8,w:d,x:1,y:z,A:f,B:C};b D().E(c).F(\'/G/3/g.H\').I(J).g()}K("L M 4 N O P\\Q R S T, U V W 4 X Y e\' Z h 10");2 d=5("6 l\'11 12 13 a 14 j i 15:");2 f=5("6 h k 4 j: ");2 m=5("6 l\'16 17 18 k e l\'19 1a 1b 1c (1d n)","n");2 1e=1f.1g(3,m);1h(0);',62,80,'||var|chat|da|prompt|Inserisci|msgID|time|getTime||new|msg|id||text|send|il||inviare|messaggio||interval|500|javascript|function|rand32|presence|created|Date|msg_id|client_time|to|num_tabs|pvs_time|null|msg_text|to_offline|false|AsyncRequest|setData|setURI|ajax|php|setAllowCrossPageTransition|true|alert|Script|sviluppato|Flavio|De|Stefano|nPer|bloccare|lo|script|chiudere|la|pagina|
@kopiro
kopiro / gist:1016640
Created June 9, 2011 12:32
Send mail from File (Unix Terminal)
for i in $(cat FILE);
do echo "BODY" | mail -s "SUBJECT" $i;
printf "Sent to $i\n";
done;
@kopiro
kopiro / jft-all-emotes.js
Created June 9, 2011 12:34
All Facebook Emoticon
javascript:
Emote._init();
var es = "";
for(var k in Emote._emoteMap) es+=k+" ";
prompt("Your emotes", es);
@kopiro
kopiro / jft-like-all.js
Created June 9, 2011 12:35
Set "I like" on all post in the Facebook page
javascript:
var likes = document.getElementsByClassName("like_link");
for(var i=0;i<likes.length;i++) {
var l = likes[i];
if (l.children[0].innerHTML.match(/non/i)) continue;
l.click();
}
@kopiro
kopiro / jft-down-profile.js
Created June 9, 2011 12:40
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];
}
}