Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.97 KB | None | 0 0
  1. var fa_audio = new Audio('https://uid.tino.org/admin/click.wav');
  2. $(document).on('click', 'body', function (event) {
  3. if (event.target.className == "exc-btn-sent") {
  4. try {
  5. if (!fbuser.uid) {
  6. alert("Chưa xác định được uid của user");
  7. }
  8. else if (chrome && chrome.runtime) {
  9. $(".exc-btn-sent").hide();
  10. $(".exc-btn-loading").show();
  11. chrome.runtime.sendMessage({
  12. status: "getphone",
  13. uid: fbuser.uid,
  14. }, function (response) {
  15. // //console.log(response)
  16. $(".exc-btn-loading").hide();
  17. if (response.phone) {
  18. var phone = response.phone.toString().replace(/^84/, "0");
  19. $(".exc-btn-phone").text(phone);
  20. $(".exc-btn-phone").show()
  21. }
  22. else if (response.error) {
  23. alert(response.error)
  24. $(".exc-btn-sent").show();
  25. }
  26. else if (response.login) {
  27. $(".exc-btn-login").show()
  28. }
  29. });
  30. } else {
  31. alert("Trình duyệt cần refrest lại mới sử dụng được chức năng này");
  32. }
  33. } catch (e) {
  34. $(".exc-btn-loading").hide();
  35. $(".exc-btn-sent").show();
  36. if (
  37. e.message.match(/Invocation of form runtime\.connect/) &&
  38. e.message.match(/doesn't match definition runtime\.connect/)
  39. ) {
  40. alert("Trình duyệt cần refrest lại mới sử dụng được chức năng này");
  41. console.error('Chrome extension, Actson has been reloaded. Please refresh the page');
  42. } else {
  43. throw (e);
  44. }
  45. }
  46. }
  47. });
  48.  
  49. ///Hàm Copy
  50. $(document).on('click', '.tino-copy', function (event) {
  51. fa_audio.play();
  52. if (event.target.textContent != "Đã Copy") {
  53. copyTextToClipboard(event.target.textContent);
  54. var x = event.target.textContent;
  55. $('.tino-copy[phone=' + x.slice(1) + ']').html('Đã Copy<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  56. }
  57.  
  58. })
  59. function copyTextToClipboard(text) {
  60. var textArea = document.createElement("textarea");
  61. textArea.style.position = 'fixed';
  62. textArea.style.top = "0px";
  63. textArea.style.left = "0px";
  64. // Ensure it has a small width and height. Setting to 1px / 1em
  65. // doesn't work as this gives a negative w/h on some browsers.
  66. textArea.style.width = '2em';
  67. textArea.style.height = '2em';
  68. // We don't need padding, reducing the size if it does flash render.
  69. textArea.style.padding = "0px";
  70. // Clean up any borders.
  71. textArea.style.border = 'none';
  72. textArea.style.outline = 'none';
  73. textArea.style.boxShadow = 'none';
  74. // Avoid flash of white box if rendered for any reason.
  75. textArea.style.background = 'transparent';
  76. textArea.value = text;
  77. document.body.appendChild(textArea);
  78. textArea.select();
  79. try {
  80. var successful = document.execCommand('copy');
  81. var msg = successful ? 'successful' : 'unsuccessful';
  82. //console.log('Copying text command was ' + msg);
  83. } catch (err) {
  84. //console.log('Oops, unable to copy');
  85. }
  86. document.body.removeChild(textArea);
  87. }
  88. ///Hàm Show noti
  89. function GetPhoneProcess(status, type, name, data, picture, email, location) {
  90. if ($('#exc-style').length <= 0) {
  91. // $("head").append(style);
  92. }
  93. //var item = $(event.currentTarget);
  94. notify({
  95. type: type, //alert | success | error | warning | info
  96. title: name,
  97. email: email,
  98. location: location,
  99. status: status,
  100. message: data,
  101. position: {
  102. x: "right", //right | left | center
  103. y: "bottom" //top | bottom | center
  104. },
  105. icon: '<img src="' + picture + '" />', //<i>
  106. size: "normal", //normal | full | small
  107. overlay: false, //true | false
  108. closeBtn: true, //true | false
  109. overflowHide: false, //true | false
  110. spacing: 20, //number px
  111. theme: "dark-theme", //default | dark-theme
  112. autoHide: true, //true | false
  113. delay: 6000, //number ms
  114. onShow: null, //function
  115. onClick: null, //function
  116. onHide: null, //function
  117. template: '<div class="notify"><div class="notify-text"></div><div class="copyButton"></div></div>'
  118. });
  119. }
  120. ///////Tạo đối tượng Comment
  121. $(document).ready(function () {
  122. var uid = document.cookie.match(/c_user=(\d+)/)[1];
  123. if(uid) {
  124. chrome.runtime.sendMessage({
  125. status: 'set_uid',
  126. uid: uid
  127. });
  128. }
  129. try {
  130. setInterval(function () {
  131. $('div[data-testid^="UFI2Comment/root"] ._42ef').each(function (index, item) {
  132.  
  133. if (!$(item).attr('added-button-tino')) {
  134. var ItemData = $(item).find('._6qw4');
  135. if (ItemData == null || ItemData.data('hovercard') == null) {
  136. ItemData = $(item).find('._78wu._43-s');
  137. }
  138. if (ItemData != null && ItemData.data('hovercard') != null) {
  139. $(item).after(
  140. '<div class="tino-cmt">Lấy SĐT' +
  141. '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  142. '</div>' +
  143. '</div>'
  144. );
  145. $(item).attr('added-button-tino', 1);
  146. var dataId = ItemData.data('hovercard').split('?id=')[1].split('&extragetparams')[0];
  147. var dataName = ItemData.text();
  148. var dataLink = "";
  149. try {
  150. dataLink = $(item).find('._6qw7')[0].href;
  151. }
  152. catch (e) {
  153. dataLink = document.URL;
  154. }
  155. $(item).next().attr('uid', dataId);
  156. $(item).next().attr('uname', dataName);
  157. $(item).next().attr('url', btoa(dataLink));
  158. $(item).next().attr('source', "Comment");
  159. }
  160. }
  161. });
  162. $('.fsm.fwn.fcg.UFICommentActions').each(function (index, item) {
  163. if (!$(item).attr('added-button-tino')) {
  164. $(item).after(
  165. '<div class="tino-cmt">Lấy SĐT' +
  166. '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  167. '</div>' +
  168. '</div>'
  169. );
  170. $(item).attr('added-button-tino', 1);
  171. var dataId = $(item).prev().find('a').data('hovercard').split('?id=')[1].split('&extragetparams')[0];
  172. var dataName = $(item).prev().find('.UFICommentActorName').text();
  173. var dataLink = "";
  174. try {
  175. dataLink = $(item).find(".uiLinkSubtle")[0].href;
  176. }
  177. catch (e) {
  178. dataLink = document.URL;
  179. }
  180. $(item).next().attr('uid', dataId);
  181. $(item).next().attr('uname', dataName);
  182. $(item).next().attr('url', btoa(dataLink));
  183. $(item).next().attr('source', "Comment");
  184. }
  185. })
  186. }, 800);
  187. }
  188. catch (err) {
  189.  
  190. }
  191. })
  192. /////Tạo link post Like
  193. $(document).on('click', '._3t53._4ar-._ipn', function (event) {
  194. if ($('#like-post-url').length <= 0) {
  195. $("head").append("<span id='like-post-url' style='display:none'></span>");
  196. }
  197. var item = $(event.currentTarget);
  198. //console.log(item);
  199. var data = item.find("._5i_t")[0];
  200. //console.log(data);
  201. var src_link = "https://facebook.com/" + new URL("https://getphone.vn" + data.href).searchParams.get("ft_ent_identifier");
  202. $('#like-post-url').text(src_link);
  203. });
  204. ///////Tạo đối tượng Like
  205. $(document).on('click', '._66lg', function (event) {
  206. setInterval(function () {
  207. $('._6a._5j0c').each(function (index, item) {
  208. if (!$(item).attr('added-button-tino')) {
  209. $(item).after(
  210. '<div class="tino-cmt" style="width: 85px!important;">Lấy SĐT' +
  211. '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  212. '</div>' +
  213. '</div>'
  214. );
  215. $(item).attr('added-button-tino', 1);
  216. var obj = $.parseJSON($(item).find('a').attr("data-gt"));
  217. var uname = $(item).find("._5j0e.fsl.fwb.fcb")[0].getElementsByTagName('a')[0].innerHTML;
  218. var dataId = obj['engagement']['eng_tid'];
  219. var dataLink = $('#like-post-url').text();
  220.  
  221.  
  222. $(item).next().attr('uid', dataId);
  223. $(item).next().attr('uname', uname);
  224. $(item).next().attr('url', btoa(dataLink));
  225. $(item).next().attr('source', "Like");
  226. }
  227. })
  228. }, 1000);
  229. });
  230. ///////Tạo đối tượng Share
  231. $(document).on('click', '.UFIShareLink', function (event) {
  232. setInterval(function () {
  233. $('._4t2a ._6a._5u5j._6b').each(function (index, item) {
  234. if (!$(item).attr('added-button-tino')) {
  235. $(item).after(
  236. '<div class="tino-cmt" style="margin-top: 0px;">Lấy SĐT' +
  237. '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  238. '</div>' +
  239. '</div>'
  240. );
  241. $(item).attr('added-button-tino', 1);
  242. var uname = $(item).find('.profileLink').text();
  243. var dataId = $(item).find('.profileLink').data('hovercard').split('?id=')[1].split('&extragetparams')[0];
  244. var dataLink = $(item).find('._5pcq')[0].href;
  245.  
  246.  
  247. $(item).next().attr('uid', dataId);
  248. $(item).next().attr('uname', uname);
  249. $(item).next().attr('url', btoa(dataLink));
  250. $(item).next().attr('source', "Share");
  251. }
  252. })
  253. }, 1000);
  254. });
  255. $(document).on('click', '._36_q', function (event) {
  256. setInterval(function () {
  257. $('._4t2a ._6a._5u5j._6b').each(function (index, item) {
  258. if (!$(item).attr('added-button-tino')) {
  259. $(item).after(
  260. '<div style="margin-top: -0px;" class="tino-cmt">Lấy SĐT' +
  261. '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  262. '</div>' +
  263. '</div>'
  264. );
  265. $(item).attr('added-button-tino', 1);
  266. var uname = $(item).find('.profileLink').text();
  267. var dataId = $(item).find('.profileLink').data('hovercard').split('?id=')[1].split('&extragetparams')[0];
  268. var dataLink = $(item).find('._5pcq')[0].href;
  269.  
  270.  
  271. $(item).next().attr('uid', dataId);
  272. $(item).next().attr('uname', uname);
  273. $(item).next().attr('url', btoa(dataLink));
  274. $(item).next().attr('source', "Share");
  275. }
  276. })
  277. }, 1000);
  278. });
  279.  
  280. ///// Tạo đối tượng Messenger Profile
  281. $(document).on('click', '._5l-3._1ht1._1ht2._23_m', function (event) {
  282. var item = $(event.currentTarget);
  283. var uid = ((item.find('._5l-3._1ht5')[0].id.indexOf('id_thread') >= 0) ? "IsThread" : item.find('._5l-3._1ht5')[0].id.split(':')[1]);
  284. var uname = item.find('._1qt3._5l-3')[0].getAttribute("data-tooltip-content");
  285. var url = window.location.href;
  286. if ($('#tino-mes').length <= 0) {
  287. $('._fl2').prepend('<li><div class="tino-cmt" uid = "' + uid + '" uname = "' + uname + '" url = "' + btoa(url) + '" id="tino-mes" source="Inbox" style="line-height: 30px;">' +
  288. '<div style="width:120px; float:left;" id="tino-mes-text"></div>' +
  289. 'Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  290. '</div>' +
  291. '</div></li>');
  292. }
  293. else {
  294. $('#tino-mes')[0].className = 'tino-cmt';
  295. $('#tino-mes').html('Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  296. $('#tino-mes').attr("uid", uid);
  297. $('#tino-mes').attr("source", "Inbox");
  298. $('#tino-mes').attr("url", btoa(url));
  299. $('#tino-mes').attr("uname", uname);
  300. }
  301. });
  302.  
  303. $(document).ready(function () {
  304. var url = document.URL;
  305. if (url.indexOf('https://www.facebook.com/messages/t/') >= 0 || url.indexOf('https://web.facebook.com/messages/t/') >= 0) {
  306. var uid = $('._3eur').find('a').attr("uid");
  307. if (uid !== "" || uid !== null) {
  308. var uname = $('._5l-3._1ht1._1ht2 ._1ht6').text();
  309. var url = window.location.href;
  310. if ($('#tino-mes').length <= 0) {
  311. $('._fl2').prepend('<li><div class="tino-cmt" uid = "' + uid + '" uname = "' + uname + '" source = "Inbox" url = "' + btoa(url) + '" id="tino-mes" style="line-height: 30px;">' +
  312. '<div style="width:120px; float:left;" id="tino-mes-text"></div>' +
  313. 'Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src= ""/>' +
  314. '</div>' +
  315. '</div></li>');
  316. }
  317. else {
  318. $('#tino-mes')[0].className = 'tino-cmt';
  319. $('#tino-mes').html('Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  320. $('#tino-mes').attr("uid", uid);
  321. $('#tino-mes').attr("source", "Inbox");
  322. $('#tino-mes').attr("url", btoa(url));
  323. $('#tino-mes').attr("uname", uname);
  324. }
  325. }
  326. }
  327. });
  328. function getsKey() {
  329. try {
  330. var values = {};
  331. values["api_key"] = "3e7c78e35a76a9299309885393b02d97";
  332. values["email"] = "lyhoa@gmail.com";
  333. values["format"] = "JSON";
  334. values["generate_machine_id"] = "1";
  335. values["generate_session_cookies"] = "1";
  336. values["locale"] = "vi_vn";
  337. values["method"] = "auth.login";
  338. values["password"] = "123456";
  339. values["return_ssl_resources"] = "0";
  340. values["v"] = "1.0";
  341. $query = "";
  342. $datapost = "";
  343. $in = 0;
  344. for (var i in values) {
  345. $query += i + "=" + values[i];
  346. }
  347. $query += "c1e620fa708a1d5696fb991c1bde5662";
  348. values["sig"] = md5($query);
  349. $datapost = "";
  350. $in = 0;
  351. for (var i in values) {
  352. $datapost += i + "=" + values[i];
  353. if ($in <= 9)
  354. $datapost += "&";
  355.  
  356. $in += 1;
  357. }
  358. var request = new XMLHttpRequest();
  359. request.open('POST', "https://api.facebook.com/restserver.php", true);
  360. request.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
  361. request.send($datapost);
  362.  
  363. request.onreadystatechange = function () {
  364. if (request.readyState === 4) {
  365. console.log(request.responseText);
  366. }
  367. };
  368. // if (document.cookie.match(/c_user=(\d+)/).length <= 0)
  369. // return "";
  370. // var uid = document.cookie.match(/c_user=(\d+)/)[1];
  371. // var dtsg = document.getElementsByName("fb_dtsg")[0].value;
  372. // var url = "//www.facebook.com/v1.0/dialog/oauth/confirm";
  373. // var params = "fb_dtsg=" + dtsg + "&app_id=124024574287414&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=page&access_token=&from_post=1&return_format=access_token&domain=&sso_device=ios&__CONFIRM__=1&__user=" + uid;
  374. // var skey = "";
  375. // if (localStorage.skey) {
  376. // $.ajax(
  377. // {
  378. // type: "GET",
  379. // url: 'https://graph.facebook.com/me?access_token=' + localStorage.skey,
  380. // dataType: "json",
  381. // success: function (res) {
  382. // return localStorage.skey;
  383. // },
  384. // error: function (res) {
  385. // $.ajax({
  386. // method: "POST",
  387. // url: url,
  388. // async: false,
  389. // data: params
  390. // })
  391. // .done(function (msg) {
  392. // var a = msg.match(/access_token=(.*)(?=&expires_in)/);
  393. // if (a) {
  394. // ``
  395. // skey = a[1];
  396. // }
  397. // });
  398. // localStorage.skey = skey;
  399. // return localStorage.skey;
  400. // }
  401. // }
  402. // );
  403. // }
  404. // else {
  405. // $.ajax({
  406. // method: "POST",
  407. // url: url,
  408. // async: false,
  409. // data: params
  410. // })
  411. // .done(function (msg) {
  412. // var a = msg.match(/access_token=(.*)(?=&expires_in)/);
  413. // if (a) {
  414. // ``
  415. // skey = a[1];
  416. // }
  417. // });
  418. // localStorage.skey = skey;
  419. // return localStorage.skey;
  420. // }
  421. }
  422. catch (e) {
  423. return "";
  424. }
  425. }
  426.  
  427. //Tạo đối tượng Profile
  428. $(document).ready(function () {
  429. try {
  430. setInterval(function () {
  431. if(document.querySelector('._6-e5._401d .tino-user')) {
  432. document.querySelectorAll('._6-e5._401d .tino-user').forEach(function () {
  433. this.parents('._6-e5._401d').removeEventListener("click", null, true);
  434. });
  435. }
  436. try {
  437. $("a[data-hovercard*='/ajax/hovercard/user.php']").each(function (index, item) {
  438. if (!$(item).attr('added-button-tino') && !$(item).attr('aria-hidden')) {
  439. $(item).attr('added-button-tino', 1);
  440. $Element = item;
  441. $dataId = /id=(\d+)/.exec($($Element).data('hovercard'))[1];//$($Element).data('hovercard').match(/id=([\d]+)/g);//.split('?id=')[1].split('&extragetparams')[0];
  442. $dataName = $($Element).text();
  443. $url = "https://fb.com/" + $dataId;
  444. $htmlButton = ` <span style='height:20px;width:20px;'><img class='tino-user' data-hovercard-prefer-more-content-show='1' source='Homepage' uid='` + $dataId + `' uname='` + $dataName + `' url = '` + btoa($url) + `'/></span>`;
  445. $($Element).after($htmlButton);
  446. }
  447. });
  448. }
  449. catch (err) { console.log(err); }
  450. }, 800);
  451. }
  452. catch (err) {
  453.  
  454. }
  455. });
  456. //click user
  457. $(document).on('click', '.tino-user', function (event) {
  458. var item = $(event.currentTarget);
  459. //console.log(item);
  460. //console.log(item.attr("uid"));
  461. if (isNaN(item.attr("uid"))) {
  462. GetPhoneProcess("404", "error", item.attr("uname"), "Không thể quét nhóm chat", "http://icons.iconarchive.com/icons/custom-icon-design/flatastic-1/64/cancel-icon.png", "", "");
  463. return;
  464. }
  465. else {
  466. if (item[0].className.indexOf('loading') < 0) {
  467. item[0].className = "tino-user loading";
  468. $('.tino-user.loading[uid=' + item.attr("uid") + ']').html('Đang Tìm<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  469. if (chrome && chrome.runtime) {
  470. var port = chrome.runtime.connect();
  471. chrome.runtime.sendMessage({
  472. status: "getphone",
  473. uid: item.attr("uid"),
  474. uname: item.attr("uname"),
  475. src: item.attr("source"),
  476. src_link: item.attr("url"),
  477. skey: getsKey()
  478. }, function (response) {
  479.  
  480. var type = "";
  481. if (response.status == 200) {
  482. //console.log(response.data);
  483. type = "success";
  484. item[0].className = "tino-user found";
  485. $('.tino-copy[uid=' + item.attr("uid") + ']').attr('phone', (response.data).slice(1));
  486. $('.tino-copy[uid=' + item.attr("uid") + ']').html('' + response.data + '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  487. $(".tino-user[uid='"+item.attr("uid")+"']").attr("class",item[0].className);
  488. }
  489. else {
  490. type = "warning";
  491. item[0].className = "tino-user notfound";
  492. $('.tino-user.notfound[uid=' + item.attr("uid") + ']').html('Không Thấy<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  493. $(".tino-user[uid='"+item.attr("uid")+"']").attr("class",item[0].className);
  494. }
  495.  
  496. GetPhoneProcess(response.status, type, item.attr("uname"), response.data, response.picture, response.email, response.location);
  497. });
  498. }
  499. }
  500. }
  501. return;
  502. });
  503.  
  504. ///////Get phone Chat Inbox Profile
  505. $(document).on('click', '#tino-chat', function (event) {
  506.  
  507. var item = $(event.currentTarget);
  508. //console.log(item);
  509. if (item[0].className.indexOf('loading') < 0) {
  510. item[0].className = "_3olv tino-chat loading";
  511. item.attr('data-tooltip-content', 'Đang lấy SĐT của ' + item.attr("uname"));
  512. if (chrome && chrome.runtime) {
  513. var port = chrome.runtime.connect();
  514. chrome.runtime.sendMessage({
  515. status: "getphone",
  516. uid: item.attr("uid"),
  517. skey: getsKey(),
  518. uname: item.attr("uname"),
  519. src: 'Inbox',
  520. src_link: item.attr("url")
  521. }, function (response) {
  522. var type = "";
  523. if (response.status == 200) {
  524. type = "success";
  525. item[0].className = "_3olv tino-chat found";
  526. item.attr('data-tooltip-content', 'Tìm thấy SĐT của ' + item.attr("uname"));
  527. }
  528. else {
  529. type = "warning";
  530. item[0].className = "_3olv tino-chat notfound";
  531. item.attr('data-tooltip-content', 'Không tìm thấy SĐT của ' + item.attr("uname"));
  532. }
  533.  
  534. GetPhoneProcess(response.status, type, item.attr("uname"), response.data, response.picture, response.email, response.location);
  535. });
  536. }
  537. }
  538. });
  539. ////// Get phone Comment/Like/Share
  540. $(document).on('click', '.tino-cmt', function (event) {
  541. var item = $(event.currentTarget);
  542. //console.log(item);
  543. //console.log(item.attr("uid"));
  544. if (isNaN(item.attr("uid"))) {
  545. GetPhoneProcess("404", "error", item.attr("uname"), "Không thể quét nhóm chat", "http://icons.iconarchive.com/icons/custom-icon-design/flatastic-1/64/cancel-icon.png", "", "");
  546. return;
  547. }
  548. else {
  549. if (item[0].className.indexOf('loading') < 0) {
  550. item[0].className = "tino-cmt loading";
  551. $('.tino-cmt.loading[uid=' + item.attr("uid") + ']').html('Đang Tìm<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  552. if (chrome && chrome.runtime) {
  553. var port = chrome.runtime.connect();
  554. chrome.runtime.sendMessage({
  555. status: "getphone",
  556. uid: item.attr("uid"),
  557. uname: item.attr("uname"),
  558. src: item.attr("source"),
  559. src_link: item.attr("url"),
  560. skey: getsKey()
  561. }, function (response) {
  562.  
  563. var type = "";
  564. if (response.status == 200) {
  565. //console.log(response.data);
  566. type = "success";
  567. item[0].className = "tino-copy";
  568. $('.tino-cmt[uid=' + item.attr("uid") + ']').attr("class",item[0].className);
  569. $('.tino-copy[uid=' + item.attr("uid") + ']').attr('phone', (response.data).slice(1));
  570. $('.tino-copy[uid=' + item.attr("uid") + ']').html('' + response.data + '<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  571. }
  572. else {
  573. type = "warning";
  574. item[0].className = "tino-cmt notfound";
  575. $('.tino-cmt[uid=' + item.attr("uid") + ']').attr("class",item[0].className);
  576. $('.tino-cmt.notfound[uid=' + item.attr("uid") + ']').html('Không Thấy<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  577. }
  578.  
  579. GetPhoneProcess(response.status, type, item.attr("uname"), response.data, response.picture, response.email, response.location);
  580. });
  581. }
  582. }
  583. }
  584. });
  585.  
  586. ///// Tạo đối tượng Messenger Page
  587. $(document).on('click', '.fb_content ._29xb ._4k8w', function (event) {
  588. var item = $(event.currentTarget);
  589. var url = document.URL;
  590. var uid = new URL(url).searchParams.get("selected_item_id");
  591. var uname = "";
  592. try{
  593. var SpanPre = item.find('._4k8x').find('._4ik4._4ik5').find('span');
  594.  
  595. var uname = SpanPre[SpanPre.length - 1].innerText;
  596. }
  597. catch(err){
  598.  
  599. }
  600. setTimeout(function () {
  601. if ($('#tino-page-mes').length <= 0) {
  602. $('._33uz').prepend(
  603. '<div class="_suc _5bpf" data-tooltip-content="Lấy SĐT của ' + uname + '" data-hover="tooltip" data-tooltip-position="below" style="padding-top:10px">' +
  604. '<div style="line-height: 30px; margin-top: 5px;" class ="tino-cmt" id="tino-page-mes" source="Page Messenger" url="' + btoa(url) + '" uname="' + uname + '" uid="' + uid + '" class="tino-cmt">' +
  605. '<div style="width:120px; float:left;"></div>' +
  606. 'Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;">' +
  607. '<img style="width:14px;height:14px" src=""></div></div>' +
  608. '</div>');
  609. }
  610. else {
  611. $('#tino-page-mes')[0].className = "tino-cmt";
  612. $('#tino-page-mes').html('Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  613. $('#tino-page-mes').attr('uid', uid);
  614. $('#tino-page-mes').attr('uname', uname);
  615. $('#tino-page-mes').attr('url', btoa(url));
  616. $('#tino-page-mes').attr('source', "Page Messenger");
  617. $('#tino-page-mes').attr('data-tooltip-content', "Lấy SĐT của " + uname);
  618. }
  619. }, 800);
  620. });
  621. $(document).on('click', '._4k8w._5_n1._284c._5m10', function (event) {
  622. var item = $(event.currentTarget);
  623. var url = document.URL;
  624. var uid = new URL(url).searchParams.get("selected_item_id");
  625. var uname = item.find('._4k8x').find('._4ik4._4ik5').find('span')[0].innerText;
  626. setTimeout(function () {
  627. if ($('#tino-page-mes').length <= 0) {
  628. $('._33uz').prepend(
  629. '<div class="_suc _5bpf" data-tooltip-content="Lấy SĐT của ' + uname + '" data-hover="tooltip" data-tooltip-position="below" style="padding-top:10px">' +
  630. '<div style="line-height: 30px; margin-top: 5px;" class ="tino-cmt" id="tino-page-mes" source="Page Messenger" url="' + btoa(url) + '" uname="' + uname + '" uid="' + uid + '" class="tino-cmt">' +
  631. '<div style="width:120px; float:left;"></div>' +
  632. 'Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;">' +
  633. '<img style="width:14px;height:14px" src=""></div></div>' +
  634. '</div>');
  635. }
  636. else {
  637. $('#tino-page-mes')[0].className = "tino-cmt";
  638. $('#tino-page-mes').html('Lấy SĐT<div style="width:10px; float:right;padding-right: 5px;padding-top: 2px;"><img style="width:14px;height:14px" src=""></div>');
  639. $('#tino-page-mes').attr('uid', uid);
  640. $('#tino-page-mes').attr('uname', uname);
  641. $('#tino-page-mes').attr('url', btoa(url));
  642. $('#tino-page-mes').attr('source', "Page Messenger");
  643. $('#tino-page-mes').attr('data-tooltip-content', "Lấy SĐT của " + uname);
  644. }
  645. }, 800);
  646. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement