leonardosc

fbflat

Nov 18th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. function visitorsfu() {
  2. // setTimeout(function() {
  3. if(!document.getElementById("visitorsblockflat")) {
  4. var strsource = document.documentElement.innerHTML;
  5. var numsor = strsource.indexOf('InitialChatFriendsList');
  6. var fisrtindex = strsource.substring(numsor+36, strsource.indexOf('],"groups":'));
  7. var seclaster = fisrtindex.replace(/"/g, '');
  8. var arraylasted2 = seclaster.split(",");
  9.  
  10. var arraylasted11 = [];
  11. for(var i = 0; i < arraylasted2.length; i++) {
  12. arraylasted11.push(arraylasted2[i].substr(0, arraylasted2[i].indexOf("-")));
  13. }
  14. var arraylasted = arraylasted11.filter( onlyUnique );
  15.  
  16.  
  17.  
  18.  
  19. var visitorsblockflat = document.createElement("div");
  20. visitorsblockflat.id = "visitorsblockflat";
  21. visitorsblockflat.style.width = '400px';
  22. visitorsblockflat.style.height = '500px';
  23. visitorsblockflat.style.position = 'fixed';
  24. visitorsblockflat.style.zIndex = '9999';
  25. visitorsblockflat.style.top = '100px';
  26. visitorsblockflat.style.background = '#213D6D';
  27. visitorsblockflat.style.boxShadow = 'rgb(39, 39, 39) 0px 0px 2px';
  28. visitorsblockflat.style.left = 'calc((100% - 530px) / 2)';
  29. visitorsblockflat.style.overflowY = 'scroll';
  30. visitorsblockflat.style.overflowX = 'hidden';
  31. visitorsblockflat.style.padding = '20px 0 0 10px';
  32. visitorsblockflat.style.display = 'none';
  33.  
  34.  
  35.  
  36.  
  37. document.getElementById("leftCol").appendChild(visitorsblockflat);
  38.  
  39.  
  40.  
  41. var watchguideflat = document.createElement("a");
  42. watchguideflat.class = "mostpeople";
  43. watchguideflat.href = "https://www.youtube.com/watch?v=anXWWpUEl9U";
  44. watchguideflat.target = "_blank";
  45. watchguideflat.style.width = "100px";
  46. watchguideflat.style.textAlign = 'center';
  47. watchguideflat.style.fontSize = '12px';
  48. watchguideflat.style.float = "left";
  49. watchguideflat.style.color = "white";
  50. watchguideflat.style.background = 'rgb(226, 47, 105)';
  51. watchguideflat.style.margin = '0 0 0 118px';
  52. watchguideflat.style.padding = '14px 30px 12px';
  53. watchguideflat.innerHTML = '&#9658; How it works';
  54. document.getElementById("visitorsblockflat").appendChild(watchguideflat);
  55.  
  56.  
  57. var peoplemost = document.createElement("p");
  58. peoplemost.class = "mostpeople";
  59. peoplemost.style.width = "100%";
  60. peoplemost.style.textAlign = 'center';
  61. peoplemost.style.fontSize = '12px';
  62. peoplemost.style.float = "left";
  63. peoplemost.style.color = "white";
  64. peoplemost.innerHTML = 'People that visit your profile most';
  65.  
  66. document.getElementById("visitorsblockflat").appendChild(peoplemost);
  67.  
  68.  
  69.  
  70. var skdfjnsdlf = document.createElement("div");
  71. skdfjnsdlf.class = "skdfjnsdlf";
  72.  
  73. if( arraylasted.length > 3) {
  74.  
  75.  
  76. for(var i = 0; i < 20; i++) {
  77.  
  78. var sum = i+1;
  79. skdfjnsdlf.innerHTML += '<div style="width:100%;float:left;margin:0 0 0 123px"><a style="float:left;" href="https://www.facebook.com/'+arraylasted[i]+'" target="_blank" class="visitflatone"><p style="float: left; margin: 23px 0 0 0;font-size: 12px;color: #A5B8C5;">'+sum+'. </p><img style="float:left;margin:5px 10px;border-radius:50px" src="https://graph.facebook.com/'+arraylasted[i]+'/picture" /><p style="float:left;margin: 23px 0 0 0;color: white;">Go to profile</p></a></div>';
  80.  
  81.  
  82. }
  83. document.getElementById("visitorsblockflat").appendChild(skdfjnsdlf);
  84. } else {
  85. skdfjnsdlf.innerHTML = '<div style="float:left;text-align: center;width: 80%;margin: 30px 0 0 10%;color:white;">Not available now. Try to <a style="color:white;text-decoration:underline" href="https://www.facebook.com">refresh a page</a></div>';
  86. document.getElementById("visitorsblockflat").appendChild(skdfjnsdlf);
  87. }
  88.  
  89.  
  90.  
  91.  
  92. var visitorslistone = document.createElement("div");
  93. visitorslistone.class = "visitorslistone";
  94.  
  95. // }, 1000);
  96. }
  97. }
Advertisement
Add Comment
Please, Sign In to add comment