flyinglamer

Untitled

Apr 4th, 2016
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Robin Voter
  3. // @namespace   flyinglamer
  4. // @author      /u/flyinglamer
  5. // @description Robin auto voter
  6. // @include     https://www.reddit.com/robin/
  7. // @version     1
  8. // @grant       none
  9. // ==/UserScript==
  10.  
  11. function vote() {
  12.   console.log('voting');
  13.   new r.robin.models.RobinRoom({room_id: r.config.robin_room_id}).postVote('INCREASE');
  14. }
  15.  
  16. function clickVote() {
  17.     if ($ && $('.robin-chat--vote-increase').length > 0) {
  18.         console.log('voting');
  19.         $('.robin-chat--vote-increase').click();
  20.     } else {
  21.         setTimeout(clickVote, 2000);
  22.     }
  23. }
  24.  
  25. setTimeout(clickVote, 2000);
Add Comment
Please, Sign In to add comment