Nucleo Robot TprenD 1.6

TprenD likea todo canal Global - Autofollow y crapero también (v6)

当前为 2019-02-11 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Nucleo Robot TprenD 1.6
  3. // @namespace https://greasyfork.org/es/scripts?set=334066
  4. // @version 1.8
  5. // @description TprenD likea todo canal Global - Autofollow y crapero también (v6)
  6. // @author by @kchamat
  7. // @match https://classic.taringa.net/TprendMod*
  8. // @include https://classic.taringa.net/*
  9. // @exclude https://classic.taringa.net/*/siguiendo/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. // ---- Para utilizarlo con otra cuenta debe cambiar la palabra TPRENDMOD por su Nick de Usuario y el numero de user_id por el id de su cuenta
  14. // ---- si desconoce el id de su cuenta ingrese en https://api.taringa.net/user/nick/view/SU_PROPIO_NICK
  15.  
  16. (function() {
  17. 'use strict';
  18. var user_nick="TprendMod";
  19. var user_id="29024560";
  20. var segundos=3;
  21. function getParameterByName(name) {
  22. name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
  23. var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
  24. results = regex.exec(location.search);
  25. return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
  26. }
  27. // funcion redirigir a tal url en 10 segundos
  28. function redirigir_a_en(url,seg) {
  29. var a = document.createElement("a");
  30. a.href = url;
  31. setTimeout(function() {
  32. a.click();
  33. }, seg*1000);
  34. }
  35. ///función para abrir en una 2da pestaña e ir dando unfollow
  36. function abrirEnPestana(url) {
  37. var a = document.createElement("a");
  38. a.target = "_al_lado";
  39. a.href = url;
  40. a.click();
  41. }
  42. // funcion para cambiar la url, por la siguiente,
  43. function change_my_url(sig_url){
  44. var stateObj = { foo: "bar" };
  45. history.pushState(stateObj, "page 2", sig_url);
  46. }
  47. var nro_page = parseInt(getParameterByName('pagina'))+1;
  48. if (isNaN(nro_page)){
  49. nro_page=0;
  50. }
  51. if (nro_page>80){
  52. nro_page=0;
  53. }
  54.  
  55.  
  56. ;
  57. //Likeando todo todo
  58. $.getJSON("https://api.taringa.net/shout/public/view", function(data) {
  59. $.each(data, function(i, item) {
  60. var id = item.id;
  61. var owner = item.owner.id;
  62. $.ajax({
  63. url: '/ajax/shout/vote',
  64. type: 'post',
  65. dataType: 'json',
  66. data: {
  67. owner: owner,
  68. uuid: id,
  69. score: 1
  70. },
  71. });
  72. });
  73. });
  74. //Seguir usuarios desde nro_page
  75. var urlapi="https://api.taringa.net/user/followers/view/"+user_id+"?trim_user=true&count=30&page="+nro_page;
  76. //alert(urlapi);
  77. $.getJSON("https://api.taringa.net/user/followers/view/"+user_id+"?trim_user=true&count=30&page="+nro_page, function(data) {
  78. $.each(data, function(nro_item2,user2) {
  79. var id = user2;
  80. notifica.ajax(Array("action=follow","type=user","obj=" + id),null,null,true,false);
  81. });
  82. });
  83. //Juega a los dados, si sale 1 re crapea un shout siempre que sea imagen
  84. $.getJSON( "https://api.taringa.net/shout/random/view", function( data ) {
  85. var items = [];
  86. $.each( data, function( key, val ) {
  87. items.push( key + ":" + val + "<br>" );
  88. });
  89. var chance=Math.floor((Math.random() * 15) + 1);
  90. var tipo_shout=data.attachment.type
  91. var owner_nick=data.owner.nick
  92. var id_shout=data.id;
  93. var texto=data.body;
  94. console.log(chance);
  95. console.log(tipo_shout);
  96. var seleccionador=chance+tipo_shout;
  97. if (seleccionador=='1image'){
  98. var image_url=data.attachment.url
  99. var contenido=texto+"\n ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ ¨ Se lo re crapíe a @"+owner_nick;
  100. $.ajax({
  101. type : 'POST',
  102. dataType: 'json',
  103. url : '/ajax/shout/add',
  104. data : {
  105. key : global_data.user_key,
  106. body : contenido,
  107. privacy : 0,
  108. attachment_type : 1,
  109. attachment : image_url
  110. }
  111. });
  112. //new Audio('https://www.soundjay.com/button/sounds/button-44.mp3').play();
  113. }
  114. });
  115. // métodos de comportamiento cíclico
  116. var url='https://classic.taringa.net/'+user_nick+'?pagina='+nro_page;
  117. var siguiente_url='/'+user_nick+'?pagina='+nro_page;
  118. $('head').append('<meta http-equiv="refresh" content="'+segundos+'">' );
  119. redirigir_a_en(url,segundos);
  120. change_my_url(siguiente_url)
  121. var nedge='https://classic.taringa.net/'+user_nick+'/siguiendo/'+(nro_page-1);
  122. abrirEnPestana(nedge);
  123. })();