Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 17th, 2012  |  syntax: None  |  size: 3.45 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. // ==UserScript==
  2. // @name           Rizkian Ancar Santoso
  3. // @namespace      AutoLike
  4. // @description    Automaticly like facebook statuses and comments
  5. // @include        http://www.facebook.com/*
  6. // ==/UserScript==
  7.  
  8. // ==============
  9. // ==Expand Older Posts==
  10. body = document.body;
  11. if(body != null) {
  12.         div = document.createElement("div");
  13.         div.style.position = "fixed";
  14.         div.style.bottom = "+102px";
  15.         div.style.left = "+6px";
  16.         div.style.backgroundColor = "#3b5998";
  17.         div.style.border = "2px solid #000000";
  18.         div.style.padding = "2px";
  19.     div.innerHTML = "<a style=\"font-weight:bold;color:#ffffff\" href=\"http://www.facebook.com/ancarsantoso\">[Made By Ancar :*]</a>"
  20.        
  21.         body.appendChild(div);
  22.        
  23.         unsafeWindow.AutoExpandPosts = function() {
  24.        
  25.                 buttons = document.getElementsByTagName("a");
  26.                 for(i = 0; i < buttons.length; i++) {
  27.                         myClass = buttons[i].getAttribute("class");
  28.                         if(myClass != null && myClass.indexOf("lfloat") >= 0)
  29.                                 if(buttons[i].getAttribute("onclick") == "ProfileStream.getInstance().showMore();return false;")
  30.                                         buttons[i].click();
  31.                 }
  32.                
  33.         };
  34. }
  35. // ==============
  36. // ==Statuses==
  37. body = document.body;
  38. if(body != null) {
  39.         div = document.createElement("div");
  40.         div.style.position = "fixed";
  41.         div.style.bottom = "+72px";
  42.         div.style.left = "+6px";
  43.         div.style.backgroundColor = "#3b5998";
  44.         div.style.border = "2px solid #000000";
  45.         div.style.padding = "2px";
  46.     div.innerHTML = "<a style=\"font-weight:bold;color:#ffffff\" href=\"JavaScript:AutoLike()\">[Like All Statuses :*]</a>"
  47.        
  48.         body.appendChild(div);
  49.        
  50.         unsafeWindow.AutoLike = function() {
  51.        
  52.                 buttons = document.getElementsByTagName("button");
  53.                 for(i = 0; i < buttons.length; i++) {
  54.                         myClass = buttons[i].getAttribute("class");
  55.                         if(myClass != null && myClass.indexOf("like_link") >= 0)
  56.                                 if(buttons[i].getAttribute("name") == "like")
  57.                                         buttons[i].click();
  58.                 }
  59.                
  60.         };
  61. }
  62. // ==============
  63. // ==Unlike Statuses==
  64. body = document.body;
  65. if(body != null) {
  66.         div = document.createElement("div");
  67.         div.style.position = "fixed";
  68.         div.style.bottom = "+52px";
  69.         div.style.left = "+6px";
  70.         div.style.backgroundColor = "#3b5998";
  71.         div.style.border = "2px solid #000000";
  72.         div.style.padding = "2px";
  73.     div.innerHTML = "<a style=\"font-weight:bold;color:#ffffff\" href=\"JavaScript:AutoUnLike()\">[Unlike All Statuses :*]</a>"
  74.        
  75.         body.appendChild(div);
  76.        
  77.         unsafeWindow.AutoUnLike = function() {
  78.        
  79.                 buttons = document.getElementsByTagName("button");
  80.                 for(i = 0; i < buttons.length; i++) {
  81.                         myClass = buttons[i].getAttribute("class");
  82.                         if(myClass != null && myClass.indexOf("like_link") >= 0)
  83.                                 if(buttons[i].getAttribute("name") == "unlike")
  84.                                         buttons[i].click();
  85.                
  86.                 }
  87.                
  88.         };
  89. }
  90. // ==============