AyrA icon

Reddit Robin Autovoter

AyrA | PRO | 04/02/16 12:06:33 AM UTC | 0 ⭐ | 567 👁️ | Never ⏰ | []
JavaScript |

850 B

|

None

|

0 👍

/

0 👎

// ==UserScript==
// @name         Robin Autovoter
// @namespace    http://ayra.ch
// @version      0.2
// @description  Autovotes via text on /r/robin
// @author       /u/AyrA_ch
// @match        https://www.reddit.com/robin*
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';
 
function sendMessage(message){
    $("#robinSendMessage > input[type='text']").val(message);
    $("#robinSendMessage > input[type='submit']").click();
}
 
function rnd(l,h)
{
    var i=(Math.random()*(h-l)+l)|0;
    console.debug("rnd",i);
    return i;
}
 
//wait 5 seconds before initializing
setTimeout(function(){
    sendMessage("/vote grow");
    //reaload after some time for safety (5 Minutes)
    setTimeout(function(){
        window.location.reload();
    }, rnd(200,400)*1000);
    console.debug("Initialized voter");
}, 5*1000);

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎