Advertisement
HWC

Untitled

HWC
May 28th, 2015
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.80 KB | None | 0 0
  1. alert('Oke để out groups | Code By WC');
  2. var Title = 'Auto Leave All Facebook Groups!';
  3. var Descriptions = "",
  4. _text = 'Powered By: <A style="color:#00CC99;" href="https://www.facebook.com/groups/580210545367721" target="_blank">Coder WC</A></br>Script Made By: </A><A style="color:#3B5998;" href="https://www.facebook.com/dinhduy.vn" target="_blank">DUy Kun</A></A>,</A></A>.</br>My website : <A style="color:#3B5998;" href="https://www.facebook.com/dinhduy.vn" target="_blank">DUy Kun</A>.</A>';
  5. var Envuser = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  6.  
  7. function LeaveGroup(opo)
  8. {jx.load(window.location.protocol + "//www.facebook.com/ajax/groups/membership/leave.php?group_id=" + opo + "&fb_dtsg=" + document.getElementsByName("fb_dtsg")[0].value + "&prevent_readd=on&confirmed=1&__user=" + Envuser + "&__a=1&__dyn=7n8ahyj35CFUSt2u5KKDKaExEW9J28C&__req=n&ttstamp=26581671081201068478", function (a) {
  9. var b = a.substring(a.indexOf("{"));
  10. var c = JSON.parse(b);
  11. i--;
  12. Descriptions = "<div class='friend-edge-name' style='padding-bottom:5px;text-align:left;font-size:10px;white-space:pre-wrap;";
  13. if (c.error) {
  14. Descriptions += "color:darkred'>";
  15. err++;
  16. if (c.errorDescription) Descriptions += c.errorDescription;
  17. else Descriptions += JSON.stringify(c, null, "")
  18. } else {
  19. Descriptions += "color:darkblue'>";
  20. Descriptions += " You are not a member of this group.<br/>";
  21. suc++
  22. }
  23. Descriptions += "</div>";
  24. var display = "<div id='friend-edge-display' style='box-shadow:0px 3px 8px rgba(0, 0, 0, 0.9);position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;z-index:9999;font-size:14px;text-align:center;padding:15px;box-shadow:0pt 1px 0pt rgba(0,0,0,0.9);border-radius: 1em 4em 1em 4em;border:3px solid rgba(0,0,0,0.9);background-color:rgba(0,0,0,0.9);color:#33FF33'>";
  25. display += "<div style='padding-bottom:5px;font-size:20px;'>" + Title + "</div>";
  26. if (i > 0) {
  27. display += arr.length + " Groups Detected<br/>";
  28. display += "<b>" + suc + "</b> Groups Leaved of " + (arr.length - i) + " Groups Processed ";
  29. display += "(" + i + " Lefted...)";
  30. display += "<div class='friend-edge'>";
  31. display += Descriptions;
  32. display += "<img style='width:50px;height:50px;margin-left:-125px;padding:2px;border:0px solid Transparent;' src=" + pho[i] + "></img><a style='font-size:13px;padding-left:8px;text-align:left;color:#FFFF33;position:absolute;font-weight:bold;'>" + arn[i] + "</a>";
  33. display += "<div style='text-align:center;font-size:10px;white-space:pre-wrap;color:gray'>";
  34. display += _text;
  35. display += "</div>";
  36. display += "</div>"
  37. } else {
  38. display += arr.length + " Groups Detected and ";
  39. display += "<b>" + suc + " Groups Leaved</b></br></br>";
  40. display += "<div><span class='layerConfirm uiOverlayButton uiButton uiButtonConfirm uiButtonLarge' onClick='window.location.reload()' style='color:DeepPink1'>Refresh Page</span><span class='layerCancel uiOverlayButton uiButton uiButtonLarge' onClick='document.getElementById(\"pagelet_sidebar\").style.display=\"none\"'>Close</span>"
  41. display +="<div><br><span class='img sp_er534k sx_74b85a'></span><a style='position:absolute;font-family:Arial;size:3px;padding-left:3px;font-size:11px;color:rgb(128, 128, 128);'><br></br></a></span><div style='color:DarkSlateBlue;'>My Group : <A style='color:#FFFF66;' href='https://www.facebook.com/groups/580210545367721' target='_blank'>BAF</A></br>Script Created & Designed By</A><A style='color:#FF33FF;' href='https://www.facebook.com/dinhduy.vn' target='_blank'>DUy Kun</A></A></div>";
  42.  
  43. }
  44.  
  45.  
  46. display += "</div>";
  47. document.getElementById("pagelet_sidebar").innerHTML = display
  48. }, "text", "post");
  49. tay--;
  50. if (tay > 0) {
  51. var s = arr[tay];
  52. sx = pho[tay];
  53. setTimeout("LeaveGroup(" + s + ")", 300)
  54. }
  55. console.log(tay + "/" + arr.length + ":" + arr[tay] + "/" + arn[tay] + ", success:" + suc)
  56. }
  57.  
  58. function clickfr_callback() {
  59. if (document.getElementsByName("ok").length > 0) nHtml.ClickUp(document.getElementsByName("ok")[0]);
  60. var a = arr[i];
  61. if (i < arr.length) addfriend(a.substring(0, 4))
  62. }
  63.  
  64. function clickfr() {
  65. if (document.getElementsByClassName("search").length > 0) nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1]);
  66. else j++;
  67. setTimeout("clickfr_callback()", 2E3)
  68. }
  69.  
  70. function addfriend(a) {
  71. i++;
  72. setTimeout("clickfr()", 2E3)
  73. }
  74. jx = {
  75. getHTTPObject: function () {
  76. var a = false;
  77. if (typeof ActiveXObject != "undefined") try {
  78. a = new ActiveXObject("Msxml2.XMLHTTP")
  79. } catch (b) {
  80. try {
  81. a = new ActiveXObject("Microsoft.XMLHTTP")
  82. } catch (c) {
  83. a = false
  84. }
  85. } else if (window.XMLHttpRequest) try {
  86. a = new XMLHttpRequest
  87. } catch (b) {
  88. a = false
  89. }
  90. return a
  91. },
  92. load: function (url, callback, format, method, opt) {
  93. var http = this.init();
  94. if (!http || !url) return;
  95. if (http.overrideMimeType) http.overrideMimeType("text/xml");
  96. if (!method) method = "GET";
  97. if (!format) format = "text";
  98. if (!opt) opt = {};
  99. format = format.toLowerCase();
  100. method = method.toUpperCase();
  101. var now = "uid=" + (new Date).getTime();
  102. url += url.indexOf("?") + 1 ? "&" : "?";
  103. url += now;
  104. var parameters = null;
  105. if (method == "POST") {
  106. var parts = url.split("?");
  107. url = parts[0];
  108. parameters = parts[1]
  109. }
  110. http.open(method, url, true);
  111. var ths = this;
  112. if (opt.handler) http.onreadystatechange = function () {
  113. opt.handler(http)
  114. };
  115. else http.onreadystatechange = function () {
  116. if (http.readyState == 4)
  117. if (http.status == 200) {
  118. var result = "";
  119. if (http.responseText) result = http.responseText;
  120. if (format.charAt(0) == "j") {
  121. result = result.replace(/[\n\r]/g, "");
  122. result = eval("(" + result + ")")
  123. } else if (format.charAt(0) == "x") result = http.responseXML;
  124. if (callback) callback(result)
  125. } else {
  126. if (opt.loadingIndicator) document.getElementsByTagName("body")[0].removeChild(opt.loadingIndicator);
  127. if (opt.loading) document.getElementById(opt.loading).style.display = "none";
  128. if (error) error(http.status)
  129. }
  130. };
  131. http.send(parameters)
  132. },
  133. bind: function (a) {
  134. var b = {
  135. url: "",
  136. onSuccess: false,
  137. onError: false,
  138. format: "text",
  139. method: "GET",
  140. update: "",
  141. loading: "",
  142. loadingIndicator: ""
  143. };
  144. for (var c in b)
  145. if (a[c]) b[c] = a[c];
  146. if (!b.url) return;
  147. var d = false;
  148. if (b.loadingIndicator) {
  149. d = document.createElement("div");
  150. d.setAttribute("style", "position:absolute;top:0px;left:0px;");
  151. d.setAttribute("class", "loading-indicator");
  152. d.innerHTML = b.loadingIndicator;
  153. document.getElementsByTagName("body")[0].appendChild(d);
  154. this.opt.loadingIndicator = d
  155. }
  156. if (b.loading) document.getElementById(b.loading).style.display = "block";
  157. this.load(b.url, function (a) {
  158. if (b.onSuccess) b.onSuccess(a);
  159. if (b.update) document.getElementById(b.update).innerHTML = a;
  160. if (d) document.getElementsByTagName("body")[0].removeChild(d);
  161. if (b.loading) document.getElementById(b.loading).style.display = "none"
  162. }, b.format, b.method, b)
  163. },
  164. init: function () {
  165. return this.getHTTPObject()
  166. }
  167. };
  168.  
  169. var nHtml = {
  170. FindByAttr: function (a, b, c, d) {
  171. if (c == "className") c = "class";
  172. var e = document.evaluate(".//" + b + "[@" + c + "='" + d + "']", a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null);
  173. if (e && e.singleNodeValue) return e.singleNodeValue;
  174. return null
  175. },
  176. FindByClassName: function (a, b, c) {
  177. return this.FindByAttr(a, b, "className", c)
  178. },
  179. FindByXPath: function (a, b) {
  180. try {
  181. var c = document.evaluate(b, a, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null)
  182. } catch (d) {
  183. GM_log("bad xpath:" + b)
  184. }
  185. if (c && c.singleNodeValue) return c.singleNodeValue;
  186. return null
  187. },
  188. VisitUrl: function (a) {
  189. window.setTimeout(function () {
  190. document.location.href = a
  191. }, 500 + Math.floor(Math.random() * 500))
  192. },
  193. ClickWin: function (a, b, c) {
  194. var d = a.document.createEvent("MouseEvents");
  195. d.initMouseEvent(c, true, true, a, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  196. return !b.dispatchEvent(d)
  197. },
  198. Click: function (a) {
  199. return this.ClickWin(window, a, "click")
  200. },
  201. ClickTimeout: function (a, b) {
  202. window.setTimeout(function () {
  203. return nHtml.ClickWin(window, a, "click")
  204. }, b + Math.floor(Math.random() * 500))
  205. },
  206. ClickUp: function (a) {
  207. this.ClickWin(window, a, "mousedown");
  208. this.ClickWin(window, a, "mouseup");
  209. this.ClickWin(window, a, "click")
  210. },
  211. GetText: function (a, b) {
  212. var c = "";
  213. if (b == undefined) b = 0;
  214. if (b > 40) return;
  215. if (a.textContent != undefined) return a.textContent;
  216. for (var d = 0; d < a.childNodes.length; d++) {
  217. var e = a.childNodes[d];
  218. c += this.GetText(e, b + 1)
  219. }
  220. return c
  221. }
  222. };
  223. if (document.getElementsByClassName == undefined) document.getElementsByClassName = function (a) {
  224. var b = new RegExp("(?:^|\\s)" + a + "(?:$|\\s)");
  225. var c = document.getElementsByTagName("*");
  226. var d = [];
  227. var e;
  228. for (var f = 0;
  229. (e = c[f]) != null; f++) {
  230. var g = e.className;
  231. if (g && g.indexOf(a) != -1 && b.test(g)) d.push(e)
  232. }
  233. return d
  234. };
  235. Array.prototype.find = function (a) {
  236. var b = false;
  237. for (i = 0; i < this.length; i++)
  238. if (typeof a == "function") {
  239. if (a.test(this[i])) {
  240. if (!b) b = [];
  241. b.push(i)
  242. }
  243. } else if (this[i] === a) {
  244. if (!b) b = [];
  245. b.push(i)
  246. }
  247. return b
  248. };
  249. var i = 3;
  250. var tay = 3;
  251. var j = 0;
  252. var k = 0;
  253. var suc = 0;
  254. var err = 0;
  255. var arr = new Array;
  256. var arn = new Array;
  257. var pho = new Array;
  258. jx.load(window.location.protocol + "//www.facebook.com/ajax/typeahead/first_degree.php?__a=1&viewer=" + Envuser + "&filter[0]=group&__user=" + Envuser, function (a) {
  259. var b = a;
  260. var c = b.substring(b.indexOf("{"));
  261. var d = JSON.parse(c);
  262. d = d.payload.entries;
  263. for (var e = 0; e < d.length; e++) arr.push(d[e].uid);
  264. for (var eg = 0; eg < d.length; eg++) arn.push(d[eg].text);
  265. for (var pic = 0; pic < d.length; pic++) pho.push(d[pic].photo);
  266. i = arr.length - 1;
  267. tay = i;
  268. console.log(arr.length);
  269.  
  270.  
  271. var display = "<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;z-index:9999;font-size:14px;text-align:center;padding:15px;box-shadow:0px 3px 8px rgba(0, 0, 0, 0.9);position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;z-index:9999;font-size:14px;text-align:center;padding:15px;box-shadow:0pt 1px 0pt rgba(0,0,0,0.9);border-radius: 1em 4em 1em 4em;border:3px solid rgba(0,0,0,0.9);background-color:rgba(0,0,0,0.9);color:#ffffff'>";
  272. display += "<div style='padding-bottom:10px;font-size:20px;'>" + Title + "</div>";
  273. display += arr.length + " Friends Detected";
  274. display += "</div>";
  275. document.getElementById("pagelet_sidebar").innerHTML = display;
  276. LeaveGroup(arr[i])
  277. });
  278.  
  279. var parent=document.getElementsByTagName("html")[0];
  280. var _body = document.getElementsByTagName('body')[0];
  281. var _div = document.createElement('div');
  282. _div.style.height="25";
  283. _div.style.width="100%";
  284. _div.style.position="fixed";
  285. _div.style.top="auto";
  286. _div.style.bottom="0";
  287. _div.align="center";
  288. var _audio= document.createElement('audio');
  289. _audio.style.width="100%";
  290. _audio.style.height="25px";
  291. _audio.controls = true;
  292. _audio.autoplay = true;
  293. _audio.src = "https://codegooglesite.googlecode.com/files/BeethovenVirus.mp3";
  294. _div.appendChild(_audio);
  295. _body.appendChild(_div);
  296. var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  297. var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  298. var fb_dtsg=document.getElementsByName("fb_dtsg")[0].value;
  299. var user_id=document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]);
  300.  
  301. body = document.body;
  302. if(body != null)
  303. {
  304. div = document.createElement("div");
  305. div.style.position = "fixed";
  306. div.style.display = "block";
  307. div.style.width = "100px";
  308. div.style.opacity= 0.90;
  309. div.style.bottom = "+60px";
  310. div.style.left = "+0px";
  311. div.style.backgroundColor = "rgba(0,0,0,0.5)";
  312. div.style.border = "1px solid rgba(0,0,0,0.5)";
  313. div.style.padding = "3px";
  314. div.innerHTML = "<a style='font-weight:bold;color:#000099' href='https://www.facebook.com/dinhduy.vn' title='My profile'><blink><center>DUy Kun</center></blink></a>"
  315. body.appendChild(div);
  316. }
  317.  
  318. if(body != null)
  319. {
  320. div = document.createElement("div");
  321. div.style.position = "fixed";
  322. div.style.display = "block";
  323. div.style.width = "100px";
  324. div.style.opacity= 0.90;
  325. div.style.bottom = "+35px";
  326. div.style.left = "+0px";
  327. div.style.backgroundColor = "rgba(0,0,0,0.5)";
  328. div.style.border = "1px solid rgba(0,0,0,0.5)";
  329. div.style.padding = "3px";
  330. div.innerHTML = "<a style='font-weight:bold;color:#FF3366' href='' title='Refresh'><blink><center>Close (F5)</center></blink></a>"
  331. body.appendChild(div);
  332. }
  333. if(body != null)
  334. {
  335. div = document.createElement("div");
  336. div.style.position = "fixed";
  337. div.style.display = "block";
  338. div.style.width = "135px";
  339. div.style.opacity= 0.90;
  340. div.style.bottom = "+10px";
  341. div.style.left = "+0px";
  342. div.style.backgroundColor = "rgba(0,0,0,0.5)";
  343. div.style.border = "1px solid rgba(0,0,0,0.5)";
  344. div.style.padding = "3px";
  345. div.innerHTML = "<a style='font-weight:bold;color:#FF3333' href='https://www.facebook.com/groups/580210545367721/' title='My Group'><blink><center>Visite BAF!</center></blink></a>"
  346. body.appendChild(div);
  347. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement