Advertisement
Guest User

Untitled

a guest
Jan 20th, 2019
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.60 KB | None | 0 0
  1. //last solution
  2.  
  3. //load jquery onto site
  4. var script = document.createElement('script');
  5. script.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js";
  6. document.getElementsByTagName('head')[0].appendChild(script);
  7.  
  8. var divs = document.getElementsByTagName("div");
  9. var foundEle;
  10. for(var i = 0; i < divs.length; i++) {
  11. if(divs[i].className=='sc-eopZyb eLmxBH'){
  12. foundEle = divs[i].children;
  13. break;
  14. }
  15. }
  16. //console.log(foundEle);
  17. for(var i = 0; i < foundEle.length; i++) {
  18. if(foundEle[i].tagName == 'DIV') {
  19. //twitter div
  20. if (foundEle[i].className=='sc-iCwjlJ dzxfbe') {
  21. var twitterChilds=foundEle[i].children[0].children[0].children;
  22. var twString = twitterChilds[1].innerHTML;
  23. if (twString.indexOf("Follow")>=0) {
  24. // Follow
  25. if (twString.indexOf("gheed")>=0) {
  26. foundEle[i].click();
  27. }
  28.  
  29. //probably add into list and then iterate through it and follow everything idk
  30. var followLink = twString.substring(twString.indexOf('"')+1,twString.indexOf('target')-2)
  31. //var openedWindow= window.open(followLink,'_blank');
  32. //after action
  33. //openedWindow.focus();
  34. var twitterDivs = document.getElementById("doc");
  35. foundEle[i].click();
  36.  
  37.  
  38. //openedWindow.close();
  39. /*
  40. if (jQuery) {
  41. console.log("hi")
  42. }
  43. */
  44.  
  45. //blocked by CORS policy
  46. /*
  47. $.get(followLink, null, function(text){
  48. alert($(text).find('#page-outer'));
  49. });
  50. */
  51.  
  52. //"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
  53.  
  54. /*
  55. // blocked by same origin policy
  56. var teste = function(){
  57. var mon = openedWindow.document.getElementById("monitor");
  58. if(typeof(mon)!="undefined"){
  59. //novoForm.alert("Achei!");
  60. var h = openedWindow.innerHeight;
  61. var strh = String(h - 40 - 30)+'px';
  62. openedWindow.document.getElementById("page-outer").style.height = strh;
  63. openedWindow.document.getElementById("page-outer").innerHTML = '<p class="legenda">&copy; NetArts | gustavopi</p>';
  64. clearInterval(id);
  65. }
  66. }
  67. var id = setInterval(teste, 100);
  68. */
  69. } else {
  70. //Retweet
  71. }
  72. } else if(foundEle[i].className=='sc-imABML cqIoqC'){
  73. //do nothing cuz no bonus for twitch shit
  74. } else if(foundEle[i].className=='sc-gbzWSY hoEhZx'){
  75. //do nothing cuz no coins to spend
  76. } else{
  77. //cant with link else it wont trigger the button
  78. foundEle[i].click();
  79. // somehow find a way to close the opened tabs
  80. }
  81. }
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement