// ==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
0 B
|👍
/👎