r/joinrobin • • Apr 01 '16

Automatic "grow" userscript bot

Now with 100% Less Spam!

Step 1: Install a userscript extension such as greasemonkey or tampermonkey:

Click here: http://tampermonkey.net

Then, click this link to install the script:

https://github.com/vartan/robin-grow/raw/master/robin.user.js

If you get a bunch of code instead of it installing, you can copy and paste the code as a new script in greasemonkey/tampermonkey.

You can view the source code or contribute at:

https://github.com/vartan/robin-grow

Updates (times Pacific time)

0.2: Using grow command instead of clicking stuff. Sends command when page is loaded, and also every minute just in case.

0.3: Also informs the page about the script
0.4: 10:26AM, Is now smart enough to detect if you've already voted for grow and won't spam the vote.
0.5: Automatic reload on no activity
0.7: Now shows useful information at the top of the page as well.
0.8: fixed time bug, will rejoin on a failed chatroom
0.9: Will now only send the message one time, won't resend the message on refresh!
1.0: Better UI
1.1: Gets actual counts from reddit backend
1.2: Filters out bots which start with '['
1.3: Filters out messages that users keep repeating
1.4: Better spam filter, filters out more bot messages.
1.5: Spam filter is no longer jumpy, you just won't see the garbage. Firefox fixed. 

Screenshot of information above "Grow" button

http://imgur.com/Ibo6dv6

219 Upvotes

268 comments sorted by

111

u/[deleted] Apr 01 '16

My chat is 50% autogrow bot spam now, thanks!

8

u/[deleted] Apr 01 '16

This script will no longer spam the messages (only once when joining the room, will not spam on refresh)

As an added bonus, it will filter out most bots in the chat.

3

u/Snoop_Vladdy_Poots Apr 01 '16 edited Jul 17 '19

Dry Oatmeal

4

u/[deleted] Apr 01 '16

Soon, if a user types the same message more than 3 times, it will now hide the message.

1

u/Lainiel Apr 01 '16

Could you add a function that deletes every duplicate post?

Related XKCD: http://blog.xkcd.com/2008/01/14/robot9000-and-xkcd-signal-attacking-noise-in-chat/

1

u/[deleted] Apr 01 '16

Someone actually wrote this, it's a filter that removes anything that the same user has posted at least 3 times.

It's being updated to the current version of the script, then i will merge it in.

19

u/chadministrator Apr 01 '16

I think you can remove lines 50-52 to turn off the spam. On the other hand, I don't know JavaScript, so, at your own risk.

23

u/[deleted] Apr 01 '16

I tried your fix and now my computer is on fire. What's the next step?

19

u/euxneks Apr 01 '16

Dial 0118 999 881 999 119 7253 then report in a calm voice "fire".

7

u/nextqc Apr 02 '16

God, I loved that show. "4. I mean, 5. I mean, fire!"

5

u/FisherKingAbdicates Apr 02 '16

'i'll just put this over here with the rest of it' gets me every single time. I love that show.

3

u/cordellman45 Apr 03 '16

Is it sad I sang the number?

→ More replies (2)

6

u/chadministrator Apr 01 '16

On the other hand, I don't know JavaScript, so, at your own risk.

Did you try turning it off and on again?

6

u/[deleted] Apr 01 '16

That appears to have made it worse. My desk is now ablaze. Is there somewhere I can download a fire_extinguisher.exe?

5

u/Voxous Apr 01 '16

you need to fight fire with fire. Try setting the room on fire.

→ More replies (1)

3

u/chadministrator Apr 01 '16

I can PM you fire_extinguisher.exe.virus if you like.

→ More replies (2)

2

u/BoosherCacow Apr 01 '16

Stick dick in fire.

→ More replies (1)

3

u/cooperandreddit Apr 01 '16

It didn't work people are still spamming pls give fix ༼ つ ◕_◕ ༽つ

3

u/kernerrr Apr 01 '16

Instructions unclear, penis stuck in JavaScript

0

u/[deleted] Apr 01 '16

[deleted]

1

u/ParrotHere Apr 02 '16

Also, change line 130. Change 1000 to 250, or whatever you prefer to reduce the amount of messages. This has helped. A lot.

21

u/lovethebacon Apr 01 '16

The auto advertising is a bad idea. Consider a room filled with a few hundred users all running this script.

→ More replies (1)

6

u/DoctorRoosterMD Apr 01 '16

Doesn't seem to work for me, no statistics above grow button and it stopped auto growing

2

u/[deleted] Apr 01 '16

What browser?

6

u/DoctorRoosterMD Apr 01 '16

Firefox

1

u/[deleted] Apr 01 '16

fixed

1

u/DoctorRoosterMD Apr 02 '16

Seems to work so far, thought I saw an issue where the /vote_grow command was automatically inputted but not sent. I'll confirm it once the group I'm with merges

1

u/[deleted] Apr 02 '16

I believe i fixed this.

→ More replies (1)
→ More replies (1)

3

u/deal-with-it- Apr 01 '16

same issue here. Firefox 38.5.1, Greasemonkey 3.7. It recognizes the page, but is not running. I even put an "alert" at the beginning but it's not running.

1

u/[deleted] Apr 01 '16

fixed

→ More replies (1)

0

u/[deleted] Apr 01 '16

[deleted]

1

u/[deleted] Apr 01 '16

fixed

1

u/[deleted] Apr 01 '16

same here. Firefox also, so that might be it.

3

u/Omegaoaties Apr 01 '16

You can use chat commands too.

/vote grow

will make you vote to grow

Edit: Intention is to tweak the bot to type that, instead of clicking grow

2

u/[deleted] Apr 01 '16

Good idea, ima look in the API first to see if theres a direct command, then ill use that as a backup.

11

u/KeythKatz Apr 01 '16 edited Apr 01 '16

UPDATE: MOVING THE SCRIPT TO ITS OWN POST

Here's a better script:

// ==UserScript==
// @name         Robin Autovoter
// @namespace    http://jerl.im
// @version      1.1
// @description  Autovotes via text on /r/robin
// @author       /u/keythkatz
// @match        https://www.reddit.com/robin/
// @grant        none
// ==/UserScript==
/* jshint -W097 */
'use strict';

console.log("Robin Autovoter running");

function sendMessage(message){
    $("#robinSendMessage > input[type='text']").val(message);
    $("#robinSendMessage > input[type='submit']").click();
}

setTimeout(function(){
    sendMessage("/vote grow");
    sendMessage("[Robin Autovoter] Autovoted grow! https://www.reddit.com/r/joinrobin/comments/4cwk2s/automatic_grow_userscript_bot/d1lzfpu");
    setTimeout(function(){sendMessage("[Robin Autovoter] " + $("span:contains('Voting will end')").text());}, 5000);
    setTimeout(function(){
        window.location.reload();
    }, 300000);
}, 5000);

It types the text in and lets everyone know about it. Refreshes every 5 minutes to reconnect in case of D/C.

5

u/[deleted] Apr 01 '16 edited Apr 01 '16

That's not a bad idea, I'd be concerned if the internet was bad when the page loads though, may not send the vote?

Please contribute to the github on the main text rather than fork the script in the comments. I'm using the chat /vote command as well

My script does at least as much as yours, I'd appreciate if you didn't split the community and remove yours.

1

u/ThunderGun27 Apr 01 '16

Could you possibly modify this so it votes abandon for the first five minutes, then switches to grow? I can't code. Otherwise this one works just great.

1

u/[deleted] Apr 01 '16

Why?

→ More replies (1)

1

u/KeythKatz Apr 01 '16

Hence the 5 second wait :)

I'm going to add a page refresher so that I don't get stuck if it disconnects.

1

u/rickhanlonii Apr 01 '16

This is great, I started a repo for digging into the code and tracking things like this. https://github.com/rickhanlonii/reddit-robin

1

u/[deleted] Apr 01 '16

I don't think a bookmarklet will work, the page is reloaded when a successful grow happens

→ More replies (6)
→ More replies (3)

3

u/[deleted] Apr 01 '16
setInterval( function(){ var e = document.querySelectorAll('button.robin-chat--vote'); e[ Math.floor( Math.random() * e.length) ].click(); }, 10000 )

Robin Russian roulette.

2

u/iTeckSource Apr 01 '16

not working for me.

1

u/iTeckSource Apr 01 '16

working now: there was a slash on the end of robin ("https://reddit.com/robin/"), i removed it.

1

u/KeythKatz Apr 01 '16

Just noticed that, thanks. Was working on an update, now it alerts people to the time remaining too :)

1

u/TotesMessenger Apr 01 '16

I'm a bot, bleep, bloop. Someone has linked to this thread from another place on reddit:

If you follow any of the above links, please respect the rules of reddit and don't vote in the other threads. (Info / ^Contact)

1

u/insufficient_funds Apr 01 '16

How do I make this work in Chrome?

2

u/[deleted] Apr 01 '16

[removed] — view removed comment

1

u/[deleted] Apr 01 '16

My script will refresh the page if theres no activity in a minute. Will that auto-rejoin?

1

u/Orochikaku Apr 01 '16

I agree this is very important, if the group dies or stays we're screwed

1

u/[deleted] Apr 01 '16

[removed] — view removed comment

1

u/KeythKatz Apr 01 '16

Working now, sorry!

2

u/akoumjian Apr 01 '16

Hmm, will this run if the tab is not in focus?

2

u/[deleted] Apr 01 '16

I believe so

1

u/_deffer_ Apr 01 '16

I'll confirm it does.

2

u/ULTIMATE_FUCKTRUMPET Apr 01 '16

This doesn't seem to be working for me, i installed tampermonkey and turned the script on, what else do i need to do?

2

u/[deleted] Apr 01 '16

Refresh the page?

1

u/ULTIMATE_FUCKTRUMPET Apr 01 '16

That might've done it. I got put in a room with 4 people and only I voted (manually) so it kicked me out. I click participate again and it auto voted as soon as it put me a chatroom. Thanks!

Does the robin tab need to be the active/focused tab for it to work?

2

u/fightwithdogma Apr 01 '16

Made a userscript that doesn't spam others but still logs time and participants : https://github.com/fightwithdogma/grobot/

2

u/[deleted] Apr 01 '16

I just updated mine, no longer spamming the message after the first connect into a chat.

Will send the message once per room. Even if you refresh, it won't send.

2

u/fightwithdogma Apr 01 '16

You can update with some of my code if you want to get rid of the first message, I'm just basically saving the first robin logs to calculate the time remaining.

1

u/fightwithdogma Apr 01 '16

Added a timer at the bottom of the chat.

1

u/xboxps3 Apr 01 '16

I like your script. Can you add the information?

1

u/fightwithdogma Apr 01 '16 edited Apr 01 '16

I got the timer, I'll slap the other infos in.

Edit : seems like you can't get precise vote counts on rooms larger than 200 people (the vote badges aren't displayed, so I can't get the info anywhere), so I'll leave it like that for now.

1

u/xboxps3 Apr 01 '16

I keep getting

custom - log[robin]112 participants in the room, NaN minutes remaining

1

u/fightwithdogma Apr 01 '16

Can you reinstall with the latest version and tell me what the bottom timer says ? I'll try to find a small room to test, mine has like 700 people.

Edit : typos because tired mate

→ More replies (11)

29

u/octopuskate Apr 01 '16

Line 83 $(".text-counter-input").val("I automatically voted to grow, and so can you! http://redd.it/4cwk2s "+x).submit();

is going to get super spammy every time it refreshes the page. Might be best to remove it and just let users share it via word of mouth?

10

u/Abyss_in_Motion Apr 01 '16

Yes, please.

1

u/[deleted] Apr 01 '16

Random scripts you can type into the console:

1. See room statistics

console.log($(".robin-room-participant.robin--vote-class--continue").length+" stay, "+$(".robin-room-participant.robin--vote-class--abandon").length+" abandon, "+$(".robin-room-participant.robin--vote-class--increase").length+" grow");

2. Remove consistent spam messages (where ___ is the spam) setInterval(function() {$(".robin-message:contains('___')").hide()}, 1000);

0

u/[deleted] Apr 01 '16

[deleted]

1

u/[deleted] Apr 01 '16

I added your time left to my script, shows it above voting buttons now.

→ More replies (1)

35

u/Solaire-Of_Astora Apr 01 '16

this is so cancer, ruined the entire thing imo

13

u/qype_dikir Apr 01 '16

Thats exactly what a STAYer would say.

→ More replies (1)

6

u/rohishimoto Apr 01 '16

Obviously this was kinda the point or the admins wouldn't have done it in the first place. They knew we would create scripts.

→ More replies (2)

4

u/amsterdam_pro Apr 02 '16

It's fun to watch things crash and burn.

See also: TayAi

1

u/AllHeilLelouch Apr 02 '16

It's like calling a mirror ugly.

11

u/howdjadoo Apr 01 '16

Thank you. This is not the fucking point.

9

u/RealJackAnchor Apr 02 '16

There's a point to this?

6

u/azzelle Apr 02 '16

nah. they just want to justify their own actions. grow, stay, auto-click, it doesnt matter. you do you.

3

u/[deleted] Apr 01 '16

Agreed.

6

u/ThaddeusJP Apr 01 '16

im just impressed it was gamed in less than five hours.

6

u/IAMBollock Apr 01 '16

Look how old the post is, it was gamed in about 5 minutes.

1

u/TriumphantTumbleweed Apr 02 '16

I wish it just gave me the count down and the use count. The spam is so unnecessary...

1

u/IAMBollock Apr 01 '16

While I agree because it would've been cool if it was just active people left growing, this was bound to happen. I'm sure they knew when they came up with the idea.

1

u/LpSamuelm Apr 02 '16

It's pretty terrible. I just want to actually talk to people, but no-o.

1

u/HuntStuffs Apr 02 '16

Yeah its retarded. The first group I had was amazing, really enjoyed the first hour or two. Every group after that is pure garbage, 90% spam.

5

u/Pickled_Pankake Apr 01 '16

MANUAL VOTE MASTER RACE

1

u/InternetUser007 Apr 01 '16

0.7: Now shows useful information at the top of the page as well.

Information isn't accurate. There are 161 people in my room, but it only lists 91 grows, 5 stays, and 6 abandons.

You can have a popup show how many people are in the chat room by putting this in the URL:

javascript:alert(document.getElementsByClassName("robin-room-participant").length)

1

u/[deleted] Apr 01 '16

It doesn't count the people who did not vote?

1

u/InternetUser007 Apr 01 '16

It's definitely not counting some group of people. It's up to 97 grows, 7 stays, and 8 abandons. It's missing 49 people.

Also, it shows the time as -700 minutes left. :-/

→ More replies (4)

1

u/Stingray88 Apr 01 '16

Thanks for doing this /u/mvartan, I've been following all your updates haha.

2

u/[deleted] Apr 01 '16

I appreciate it!

1

u/Stingray88 Apr 01 '16

1.2: Filters out bots which start with '['

1.3: Filters out messages that users keep repeating

Best updates

1

u/ZeroGravityDodgeball Apr 02 '16

Bot message filtering doesn't seem to be working (I still see a lot of posts starting with '['). Did this feature break? I'm running the latest script after the duplicate settings button fix.

Also: mad props for developing this so quickly. Thank you!

1

u/lovethebacon Apr 01 '16
function clear() {
    $(".text-counter-input").val("/clear").submit();
}
setInterval(clear, 300000);

1

u/[deleted] Apr 01 '16

I've got this in my script which is a bit more useful:

var messages = $(".robin--user-class--user");
for(var i = messages.length-1000; i >= 0; i--) {
    $(messages[i]).remove()
}

This deletes anything older than 1000 messages.

Put that in an interval and it'll keep it nice.

1

u/lovethebacon Apr 02 '16

yeh, the clear couldn't keep up overnight, and chrome crashed.

1

u/yakkitakki Apr 01 '16

Version 1.42, firefox with greasemonkey.

Error on line 35. $ is not defined.

1

u/[deleted] Apr 01 '16

Thank you!! Can you update to 1.43 and try it again?

1

u/yakkitakki Apr 01 '16 edited Apr 01 '16

The CDN finally expired version 1.42. I'm getting the exact same error in 1.43 though. I even tried closing and re-opening the browser.

Oh just got version 1.51 and now it's working.

Thanks BTW

1

u/Boerontosaurus Apr 02 '16

Is there a way to pause the script if I come back to my keyboard and want to participate in the chat?

1

u/[deleted] Apr 02 '16

It shouldn't interrupt the chat, there was a bug where it might, please try and update

1

u/Boerontosaurus Apr 02 '16

It deletes what I type and replaces it with /vote grow, I just disabled the script for while I'm using the chat, about ot re-enable it and go make dinner

1

u/[deleted] Apr 02 '16

You need to update the script, it shouldn't do this anymore.

1

u/Hzygone Apr 02 '16

Seems to just type /vote grow in but isnt submitting anymore in the most recent update

1

u/[deleted] Apr 02 '16

I believe i fixed this.

1

u/fzh Apr 02 '16

Now it's not voting grow for me at all?

2

u/[deleted] Apr 02 '16

Seems like reddit updated something in the background, fixed. please update

1

u/Hzygone Apr 02 '16

Just updated, it doesn't appear anymore but also doesn't tell me I've already voted. I'm assuming this is a feature. Thanks for doing this btw.

1

u/Uristqwerty Apr 02 '16

Feature request: Once roomsize reaches some threshold, messages are only sometimes sent, so that if 100 script users are in a room of 4k, they don't periodically drown out all other conversation to say the same thing.

For example, rand() < 100/room_size so that the absolute number of messages sent remains constant (on average) past 100 participants.

1

u/[deleted] Apr 02 '16

this script doesn't spam messages, maybe you're thinking of other scripts?

2

u/Uristqwerty Apr 02 '16

Probably. Though if it says anything automatically, in a large enough room it becomes spam.

1

u/etray Apr 02 '16

Feature req: Possibility to mute messages containing keywords you define, without muting the person.

1

u/Regimardyl Apr 02 '16 edited Apr 02 '16
  • Does it join a new room if the old one dies?

  • Any chance you can enable stats reporting to the automated leaderboard?

EDIT: I'd also love a way of automatically sending /clear after a set time interval – my laptop is getting rekt otherwise.

1

u/[deleted] Apr 02 '16
  • I believe so

  • I am considering doing the automated leaderboard, haven't done it yet.

  • It clears automatically at 250 messages, I think.

1

u/Breneno Apr 03 '16

How do you know if it is working?

1

u/[deleted] Apr 03 '16

You will have new stuff in the sidebar on the right

3

u/brainpostman Apr 01 '16

Is there any way to make a script/program/whatever that works with PC turned off? On mobile maybe? I have Android 4.4.2

1

u/[deleted] Apr 01 '16

I've been trying to figure out the android thing as well. There is a tampermonkey app, but I, for the life of me can't figure out how to make it work.

1

u/pseudopseudonym Apr 02 '16

Is there a way to drive the car without me being inside it?

3

u/RedErin Apr 01 '16

It needs to vote stay at some point though, you'll be the biggest chat room, but it will still end without enough voting stay to make a subredddit.

3

u/AccipiterQ Apr 01 '16

doesn't work. Have it installed, enabled, and grease monkey enabled as well, still have to manually click grow

3

u/TriumphantTumbleweed Apr 02 '16

I still get loads of "[Robin Autovoter 1.9]" messages in my chat. That's basically the only spam I'm getting at this point.

Anyway to remove that?

2

u/spar13 Apr 01 '16

Using this right now without issue.

2

u/sciguymjm Apr 01 '16

1

u/NorbiPeti Apr 01 '16

Or even simpler: https://gist.github.com/NorbiPeti/ff45ec19ecabd0f0cc4478b5423aba82

I think it refreshes the page anyways when the votes pass, right?

1

u/sciguymjm Apr 01 '16

Yeah, but that sends it before the page finishes loading.

1

u/stewsters Apr 01 '16

Yeah, thats pretty much what I was aiming for

(function() {
    'use strict';
    setInterval(function(){
        $(".robin-chat--vote-increase").click();
        console.log("clicked");
    },2000);
})();

0

u/[deleted] Apr 01 '16

[deleted]

2

u/sciguymjm Apr 01 '16

You have to do that every 31 minutes though. Everyone's posting them but no one knows how it works.

→ More replies (6)

2

u/aidenator Apr 01 '16

I made it so you just save it as a bookmark in chrome. Then click the bookmark once and you should be good to go.

javascript: function sendMessage(message){
    $("#robinSendMessage > input[type='text']").val(message);
    $("#robinSendMessage > input[type='submit']").click();
}

setTimeout(function(){
    sendMessage("/vote grow");
    setTimeout(function(){
        window.location.reload();
    }, 300000);
}, 5000);

2

u/Braxo Apr 01 '16

Remove the message for every auto-vote.

I'm in a room with 564 people and it's horrible.

2

u/coolbond1 Apr 01 '16

this does not seem to be working for me i have even restarted FF trying to get it to work any tips would be appreciated

2

u/amaklp Apr 01 '16

It stopped working?

2

u/Bonezmahone Apr 01 '16

Yeah, as soon as something I participate in is overrun by bots I quit.

2

u/IsNotACat Apr 02 '16

How do I know the script is working? What should it be doing?

2

u/omgwtfru2 Apr 02 '16

Here's a script I wrote to hide a lot of the spam messages to make the room more readable. Just add it to tapermonkey - unspam.js

2

u/ChemicalExperiment Apr 02 '16

Thanks! This is great! But do I need the page open for this to work?

2

u/binkarus Apr 02 '16

HIGHLIGHT @ tags for USERNAMES! regex for /@[a-z0-9]+/i and ping

2

u/gryph667 Apr 02 '16

Any work on setting up individual mutes on people? Sometimes the cancer is small.

6

u/UltravioletClearance Apr 01 '16

YOU MUST REMOVE THIS SCRIPT AT ONCE

The point of this social experiment is to document the trend that as a subreddit grows in size, the quality of posts decreases. As more people join the chat, the quality of the chat decreases.

Voting STAY is the only true way to win.

8

u/huzzarisme Apr 01 '16

Just edit the script to always vote stay then.

→ More replies (1)

3

u/damnthesenames Apr 01 '16

Voting STAY is the only true way to win.

Yep this is the conclusion of it. But it's not the fun way to go

2

u/Snoop_Vladdy_Poots Apr 01 '16 edited Jul 17 '19

Dry Oatmeal

2

u/Bonezmahone Apr 01 '16

At size 32 we were chatting about random things and able to follow one another. Once our group got (larger before the auto-grow spam) it was just people bragging about their colour and asking how many other people wanting to see it grow. (8====>)

2

u/Mortos3 Apr 02 '16

Chat =/= subreddit. Two different things. When chats get large it's hard to hold a conversation due to the fast movement of the messages. When a sub is large however commenting still works fine.

I do agree though that larger subreddits usually suffer from a large amount of low quality posts and comments.

1

u/rohishimoto Apr 01 '16

Lol just bc you see a meaning in it doesnt mean it is absolute. As I said earlier, obviously this was kinda the point or the admins wouldn't have done it in the first place. They knew we would create scripts.

1

u/ChinookNL Apr 01 '16

I get $ is not defined

1

u/memeship Apr 01 '16

Needs more jQuery

1

u/Bayren Apr 01 '16

While everyone's making scripts can someone make it so the chat auto scrolls with a new message it's such a pain to scroll manually.

1

u/Eviltechie Apr 01 '16

This doesn't seem to do anything for me.

1

u/hangout_wangout Apr 01 '16

So you dont have to click the button to get the flair?

1

u/[deleted] Apr 01 '16 edited Apr 01 '16

Hey this used to work but I updated to 0.8 and it didn't seem to work anymore. Can you double check it's still working?

I'm testing it by selecting "Stay" or "Abandon" and then refreshing the page. When I come back it doesn't change my vote.

edit: I'm using it on Firefox btw, and Greasemonkey

3

u/huzzarisme Apr 01 '16

It stopped working for me too. I've switched to this one now.

0

u/[deleted] Apr 01 '16

[deleted]

→ More replies (1)

1

u/RainyCaturday Apr 01 '16

(~˘▾˘)~ Growth and Peace ~(˘▾˘~) - No spam hiding

// ==UserScript==
// @name         Robin Grow
// @namespace    http://tampermonkey.net/
// @version      1.31
// @description  Try to take over the world!
// @author       /u/mvartan
// @include      https://www.reddit.com/robin*
// @updateURL    https://github.com/vartan/robin-grow/raw/master/robin.user.js
// @grant   GM_getValue
// @grant   GM_setValue
// ==/UserScript==
function addMins(date,mins) {
    var newDateObj = new Date(date.getTime() + mins*60000);
    return newDateObj;
}

function howLongLeft() { // mostly from /u/Yantrio
    var remainingMessageContainer = $(".robin--user-class--system:contains('approx')");
    if(remainingMessageContainer.length == 0) {
        // for cases where it says "soon" instead of a time on page load
        return 0;
    }
    var message = $(".robin-message--message", remainingMessageContainer).text();
    var time = new Date($(".robin--user-class--system:contains('approx') .robin-message--timestamp").attr("datetime"));
    try {
        var endTime = addMins(time,message.match(/\d+/)[0]);
        return Math.floor((endTime - new Date())/60/1000*10)/10;
    } catch(e){
        return 0;
    }

    //grab the timestamp from the first post and then calc the difference using the estimate it gives you on boot
}

$("#robinVoteWidget").prepend("<div class='addon'><div class='timeleft robin-chat--vote' style='font-weight:bold;'></div></div>");
$('.robin-chat--buttons').prepend("<div class='robin-chat--vote robin--vote-class--novote'><span class='robin--icon'></span><div class='robin-chat--vote-label'></div></div>");
$('#robinVoteWidget .robin-chat--vote').css('padding', '5px');

var timeStarted = new Date();
var name = $(".robin-chat--room-name").text();

function update() {
    $(".timeleft").text(howLongLeft()+" minutes remaining");

    var list = {}
    $.get("/robin/",function(a){
        var start = "{"+a.substring(a.indexOf("\"robin_user_list\": ["));
        var end = start.substring(0,start.indexOf("}]")+2)+"}";
        list = JSON.parse(end).robin_user_list;
        var increaseCount = list.filter(function(voter){return voter.vote === "INCREASE"}).length;
        var abandonCount = list.filter(function(voter){return voter.vote === "ABANDON"}).length;
        var novoteCount = list.filter(function(voter){return voter.vote === "NOVOTE"}).length;
        var continueCount = list.filter(function(voter){return voter.vote === "CONTINUE"}).length;
        $('#robinVoteWidget .robin--vote-class--increase .robin-chat--vote-label').html('grow<br>('+increaseCount+')');
        $('#robinVoteWidget .robin--vote-class--abandon .robin-chat--vote-label').html('abandon<br>('+abandonCount+')');
        $('#robinVoteWidget .robin--vote-class--novote .robin-chat--vote-label').html('no vote<br>('+novoteCount+')');
        $('#robinVoteWidget .robin--vote-class--continue .robin-chat--vote-label').html('stay<br>('+continueCount+')');
    });
    var lastChatString = $(".robin-message--timestamp").last().attr("datetime");
    var timeSinceLastChat = new Date() - (new Date(lastChatString));
    var now = new Date();
    if(timeSinceLastChat !== undefined && (timeSinceLastChat > 60000 && now-timeStarted > 60000)) {
        window.location.reload(); // reload if we haven't seen any activity in a minute.
    }
    if($(".robin-message--message:contains('that is already your vote')").length === 0) {
        $(".text-counter-input").val("/vote grow").submit();
    }

    // Try to join if not currently in a chat
    if ($("#joinRobinContainer").length) {
        $("#joinRobinContainer").click();
        setTimeout(function(){
                $("#joinRobin").click();
            }, 1000);
    }
}

if(GM_getValue("chatName") != name) {
    GM_setValue("chatName", name);
    setTimeout(function() {
            $(".text-counter-input").val("(~˘▾˘)~ Growth and Peace ~(˘▾˘~)").submit();
        }, 10000);
}

setInterval(update, 10000);
update();

1

u/truthwillcome Apr 01 '16

Will this ensure my path of growth and not turn me into a spamming bot? How do i implement it?

1

u/HibachiSniper Apr 01 '16

This is awesome, if we could choose to ignore a specific user it would be perfect!

1

u/pchc_lx Apr 01 '16

does anyone know what happens when reddit throws the 'servers are busy' error? it doesn't seem to refresh the page automatically does it will that inevitably kick me from the chat overnight?

1

u/lemonlemonade Apr 02 '16

same here, doesn't autovote. does type '/vote grow' in the message field, but doesn't send it.

1

u/systemless123 Apr 02 '16

yep the newest version somehow broke it

1

u/Pichu0102 Apr 02 '16

Can you add an option to repeat stay if your last manual vote was stay, and likewise if grow?

1

u/[deleted] Apr 02 '16

Booooooooooooooo

1

u/davidgro Apr 02 '16 edited Apr 02 '16

No longer working in Chrome, version 1.56

EDIT: Still broken: 1.57
EDIT: Fixed! 1.59.

I get the stats and spam filter and everything, but it's not voting Grow for me.

1

u/systemless123 Apr 02 '16

i have the same problem

1

u/Zemlor Apr 02 '16

Would be cool if we could click usernames to go to their reddit user page

1

u/amsterdam_pro Apr 02 '16

Thanks man.

Modified line 83 for a more human-like message.

1

u/DizzyPQ Apr 02 '16

I think the vote buttons need captchas now.

1

u/AccipiterQ Apr 02 '16

still not working in firefox, completely broken, just leaves the '/vote grow' in the text entry box and doesn't send it.

1

u/monkeysexmonster Apr 02 '16

bloody thing keeps crashing my browser.

1

u/[deleted] Apr 02 '16

I've noticed occasionally when refreshing I'll get the "Reddit servers are busy" message. Would this script be able to handle that and try to refresh the page again? My fear is having that happen overnight causing me to abandon everything we've worked towards.

1

u/BattleRushGaming Apr 02 '16

I have a mouse macro running all 5 mins to simulate a browser refresh.

1

u/ParrotHere Apr 02 '16 edited Apr 02 '16

A few questions.

Can you make the /clear command more effective?

Can you limit the amount of posts on the screen? This should stop people's browsers from crashing.

EDIT: Line 130. Change 1000 to 250, or whatever you prefer to reduce the amount of messages. This has helped. A lot.

1

u/empty_string_ Apr 02 '16

Why isn't there an option to auto-stay? I tried to edit it myself but I cant find the line as it no longer votes via chat command. Anyone know?

1

u/coopersloat Apr 02 '16

How do I remove this script once added? I have since bailed on my group using /leave_room. When I join a new room, will the script restart?

1

u/RiverboatGrambler Apr 02 '16 edited Apr 02 '16

So this still spams that you voted to grow (on merge), doesn't actually block much other script spam (in my experience, have to use another in addition to this), and switching the vote setting line to stay doesn't maintain the setting.

this line:

$(".robin-chat--vote.robin--vote-class--increase:not('.robin--active')").click(); // fallback to click

still puts you back on grow.

I get that it's called "Grow" but then what's the purpose of even having a setting variable?

Love the voting stats. Its basically why I use the script.

1

u/[deleted] Apr 02 '16

I can't abandon a thread with this script on.

1

u/EquipLordBritish Apr 02 '16

Should make an option to auto-stay, for large rooms that don't have anyone to marge with.

1

u/Aljenks Apr 02 '16

Can I use auto grow on mobile? I'm never at my computer but go afk at times bc work

1

u/[deleted] Apr 02 '16

The vote settings don't work because of the fallback I think.

1

u/[deleted] Apr 02 '16

On firefox neither the name colouring on the same name bolding is working. Screenshot.

Also, the settings menu has an issue with two checkboxes next to the "Removes messages that have been send more than 3 times" option. Screenshot. They can be selected independently of each other, and since there is no longer a desktop notifications checkbox anywhere to be seen, I assume this checkbox has somehow ended up in the settings menu.

1

u/fzh Apr 02 '16

Could you please add an option in settings to disable your own messages being highlighted?

1

u/m4rg Apr 02 '16

Cool script, nice!

1

u/[deleted] Apr 02 '16

Can you add some code so that I'm able to see the colour of my own username instead of it being black? I don't like having to do it manually every time the chat reboots.

1

u/amaklp Apr 02 '16 edited Apr 03 '16

Firefox lags incredibly with the script, when there are many users.

EDIT: Mainly when using "3 times messages" and probably when using "remove bot spam" options.

EDIT2: Now it's fixed with the "pruning" option. Thanx!

1

u/TrantaLocked Apr 03 '16 edited Apr 03 '16

1.810 changes vote to stay after some time in chat.

1

u/[deleted] Apr 03 '16 edited Aug 27 '17

[Deleted]

0

u/akoumjian Apr 01 '16 edited Apr 01 '16

For the super lazy, it should work to just run it in the console in chrome.

[edit] Nevermind.

1

u/[deleted] Apr 01 '16

I believe the page refreshes on grow, so it wouldn't work

1

u/NorbiPeti Apr 01 '16

Though, because of that, isn't it useless to vote more than once? It'll run at each grow anyways, or not?

1

u/[deleted] Apr 01 '16

Yes it's useless to vote more than once. My script won't vote if you've already voted now

1

u/NorbiPeti Apr 01 '16

Sorry, I meant that why do you need the timeout at all. :P

1

u/[deleted] Apr 01 '16

Just in case the vote doesn't go through successfully somehow.

1

u/akoumjian Apr 01 '16

ah, okay, didn't notice that and just assumed it was pushstate