unohoo09

Untitled

Apr 2nd, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Robin Autovote non spammy
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.1
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://www.reddit.com/robin/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // Your code here...
  15. function sendMessage(message){
  16. $("#robinSendMessage > input[type='text']").val(message);
  17. $("#robinSendMessage > input[type='submit']").click();
  18. }
  19.  
  20. function getUserCount(){
  21. var participants = $(".robin-room-participant").length;
  22. var overflowCount = (participants == 200) ? parseInt( $(".robin-user-list-overflow-indicator").text().replace(/\D/g,'') ) : 0;
  23. return participants + overflowCount;
  24. }
  25.  
  26. setTimeout(function(){
  27. sendMessage("/vote grow");
  28. console.info("[Autovoter-fork 1.9] " + getUserCount() + " in this room! " + $("span:contains('Voting will end')").first().text());
  29. setTimeout(function(){
  30. window.location.reload();
  31. }, 300000);
  32. }, 5000);})();
Add Comment
Please, Sign In to add comment