Bot | Voxed

Poné lo que querés comentar y cada cuantos segundos lo querés comentar.

当前为 2017-12-09 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Bot | Voxed
  3. // @namespace voxed.bot
  4. // @version 1.0
  5. // @description Poné lo que querés comentar y cada cuantos segundos lo querés comentar.
  6. // @author Hhaz
  7. // @match http*://www.voxed.net/*
  8. // ==/UserScript==
  9.  
  10. $('html').prepend('<style>#bot {cursor: pointer;font-size: 0.85em;}</style>');
  11.  
  12. $('.comments-box .anon').prepend('<button id="bot" class="button">Bot</button>');
  13.  
  14. $(document).ready(function(){
  15. $("#bot").click(function(){
  16. /*var answers = [
  17. "Hey",
  18. "Howdy",
  19. "Hello There",
  20. "Wotcha",
  21. "Alright gov'nor"
  22. ];
  23.  
  24. var randomAnswer = answers[Math.floor(Math.random() * answers.length)];*/
  25.  
  26.  
  27. var text = prompt("El texto que querés comentar:");
  28.  
  29. //if (text < 1 && seconds < 1) { ### TEXTO Y SEGUNDOS ###
  30.  
  31. if (text < 1) {
  32. alert("No ingresaste ningún texto.");
  33. return false;
  34.  
  35. }else{
  36. var seconds = prompt("Segundos:");
  37. setInterval(function() {
  38. var elements = document.getElementsByClassName("show-for-small-only");
  39. elements = Array.prototype.slice.call(elements);
  40. if(!elements.length);
  41. elements.forEach(function(btn) {
  42. $('#content').val(text); //randomAnswer si quiero con Arrays
  43. //$('#content').val('Hola, soy hermoso.');
  44. btn.click();
  45. });
  46. }, seconds+'000'); }
  47. });
  48.  
  49. });