CazaTools(BETA)(v6)

Herramientas para automatizar acciones en Taringa.net (v6). (BETA)

  1. // ==UserScript==
  2. // @name CazaTools(BETA)(v6)
  3. // @namespace CazaTools
  4. // @version 0.9
  5. // @description Herramientas para automatizar acciones en Taringa.net (v6). (BETA)
  6. // @author @Cazador4ever
  7. // @match http*://*.taringa.net/mi
  8. // @include http*://*.taringa.net/posts/*
  9. // @include http*://*.taringa.net/*
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function($) {
  14. 'use strict';
  15. function cazaTools() {
  16. function getRnd(arr) {
  17. return arr[Math.floor(Math.random() * arr.length)];
  18. }
  19. var exists = !!$('#cazaTools').length;
  20. if ( !exists ) {
  21. $('body').append('<style type="text/css">.cTools {-webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; float: right; width: 100px; position: fixed; top: 44%; left: 2px; padding: 10px 0; overflow: auto; border: none; -webkit-border-radius: 10px; border-radius: 10px; font: normal 16px/1 "Lucida Console", Monaco, monospace; color: rgb(255, 255, 255); text-align: center; -o-text-overflow: ellipsis; text-overflow: ellipsis; background: rgba(40,40,40,0.11); -webkit-transition: all 100ms cubic-bezier(0.25, 0.25, 0.75, 0.75); -moz-transition: all 100ms cubic-bezier(0.25, 0.25, 0.75, 0.75); -o-transition: all 100ms cubic-bezier(0.25, 0.25, 0.75, 0.75); transition: all 100ms cubic-bezier(0.25, 0.25, 0.75, 0.75); } .cTools:hover {font: normal normal bold 16px/1 "Lucida Console", Monaco, monospace; background: rgba(0,0,0,0.25); }</style>' +
  22. '<style type="text/css">.cBtn {display: inline-block; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; width: 30px; height: 30px; cursor: pointer; margin: auto; padding: 0 auto auto; border: 1px solid rgba(255,255,255,0.3); -webkit-border-radius: 5px; border-radius: 5px; font: normal 12px/normal "Lucida Console", Monaco, monospace; color: rgba(255,255,255,0.9); -o-text-overflow: clip; text-overflow: clip; background: #000000; -webkit-box-shadow: 2px 2px 5px 0 rgba(255,255,255,0.3) ; box-shadow: 2px 2px 5px 0 rgba(255,255,255,0.3) ; -webkit-transition: all 10ms cubic-bezier(0.42, 0, 0.58, 1); -moz-transition: all 10ms cubic-bezier(0.42, 0, 0.58, 1); -o-transition: all 10ms cubic-bezier(0.42, 0, 0.58, 1); transition: all 10ms cubic-bezier(0.42, 0, 0.58, 1); } .cBtn:hover {border: 1px solid rgba(255,255,255,0.5); } .cBtn:active {border: 1px solid rgba(255,255,255,0.58); -webkit-box-shadow: 2px 2px 5px 0 rgba(255,255,255,0.3) inset; box-shadow: 2px 2px 5px 0 rgba(255,255,255,0.3) inset; }</style>' +
  23. '<div id="cazaTools" class="cTools" style="position: fixed;">' +
  24. '<button id="reload" title="Recargar la pagina" class="cBtn"><img src="https://k60.kn3.net/8/2/2/B/7/7/B79.png" height="24" width="24"></button>' +
  25. '<button id="save" title="Guardar la apgina en archive.is" class="cBtn"><img src="http://www.scienceclass411.com/images/stylistica-icons-set/png/128x128/save.png" height="24" width="24"></button>'+
  26. '<button id="likeador" title="Dar like a shouts" class="cBtn"><img src="https://k60.kn3.net/A/3/2/D/D/C/99C.png" height="24" width="24"></button>' +
  27. '<button id="recomendar" title="Recomendar un post (funciona solo cuando estemos en el mismo post)" class="cBtn"><img src="https://k61.kn3.net/9/1/B/B/B/E/F0B.png" height="24" width="24"></button>' +
  28. '<button id="compartir" title="Compartir la pagina en donde estamos" class="cBtn"><img src="https://k61.kn3.net/6/F/7/D/4/D/ABF.png" height="24" width="24"></button>' +
  29. '<button id="scroll" class="cBtn" title="¡Subir Arriba!"><img src="http://o1.t26.net/img/arrowtop.png" height="24" width="24"></button>'+
  30. '</div>');
  31.  
  32.  
  33. }
  34. $('#reload').on('click', function(){
  35. location.reload(true);
  36. });
  37. $('#save').on('click', function(){
  38. void(open('https://archive.is/?run=1&url='+encodeURIComponent(document.location)));
  39. });
  40. $('#likeador').on('click', function(){
  41. $(".require-login.button-action-s.action-vote.hastipsy.pointer").click();
  42. });
  43. $('#scroll').click(function() {
  44. scrollTo(0, 0);
  45. });
  46. $('#compartir').on('click', function(){
  47. var link = ''+document.URL+'';
  48. var cont;
  49. $.ajax({
  50. type : 'POST',
  51. dataType: 'json',
  52. url : '/ajax/shout/attach',
  53. data : {
  54. url : link
  55. },
  56. success: function(data){
  57. $.ajax({
  58. type : 'POST',
  59. dataType : 'json',
  60. url : '/ajax/shout/add',
  61. data : {
  62. key : global_data.user_key,
  63. body : cont,
  64. privacy : 0,
  65. attachment_type : 3,
  66. attachment : data.data.id
  67.  
  68. }
  69. });
  70. },
  71. error: function(){
  72. alert('¡Error, no se pudo compartir el link, intente nuevamente!');
  73. },
  74. complete: function(){
  75. console.info('¡Listo!');
  76. }
  77. });
  78.  
  79. });
  80. $('#recomendar').on('click', function() {
  81. var link = ''+document.URL+'';
  82. var usuario = $('.user.textlimit.truncate').text();
  83. var cont = '['+'['+'['+'['+ usuario +']'+']'+']'+']\n'+'@'+ usuario +'';
  84. $.ajax({
  85. type : 'POST',
  86. dataType: 'json',
  87. url : '/ajax/shout/attach',
  88. data : {
  89. url : link
  90. },
  91. success: function(data){
  92. $.ajax({
  93. type : 'POST',
  94. dataType : 'json',
  95. url : '/ajax/shout/add',
  96. data : {
  97. key : global_data.user_key,
  98. body : cont,
  99. privacy : 0,
  100. attachment_type : 3,
  101. attachment : data.data.id
  102.  
  103. }
  104. });
  105. },
  106. error: function(){
  107. alert('¡Error, no se pudo compartir el post, intente nuevamente!');
  108. },
  109. complete: function(){
  110. console.info('¡Listo!');
  111. }
  112. });
  113. });
  114. }
  115. console.info('-¿Para que nos caemos? -Para aprender a levantarnos.');
  116. cazaTools();
  117. })(jQuery);