Automatically upvote after X minutes (Steemit bookmarklet)

10 months ago
54 in steemtools

I've made a bookmarklet that automatically lays an upvote at the minute mark you decide. Simply activate it, enter at what minute it should vote and keep the tab open. It will tell you in the title bar how many minutes left until vote and also show when a post has been upvoted.

Installation

Head over to steemlets.com and drag the "Vote at X" button to your bookmarks bar.

Alternatively, create a new bookmark and add the following code as URL:

javascript:(function() { function setTitle(voteAt, minutesAgo, originalTitle) { var voteIn = voteAt - minutesAgo; var unit = (voteIn === 1 ? 'minute' : 'minutes'); var newTitle = '<Votes in ' + voteIn + ' ' + unit + '> | ' + originalTitle; if (document.title !== newTitle) { document.title = newTitle; } }; function run(voteAt, originalTitle, voted) { if (!voteAt) { return; } voteAt = parseInt(voteAt); if (document.title.indexOf(originalTitle) === -1) { return; } var timeParts = document.getElementsByTagName('time')[0].innerHTML.split(' '); if (timeParts[1].indexOf('minute') !== -1) { var minutesAgo = parseInt(timeParts[0]); if (minutesAgo >= voteAt) { if (!voted) { document.querySelector('.PostFull__footer [title="Upvote"]').click(); voted = true; }; document.title = '<Upvoted!> | ' + originalTitle; } else { setTitle(voteAt, minutesAgo, originalTitle); } } else { setTitle(voteAt, 0, originalTitle); } setTimeout(function() { run(voteAt, originalTitle, voted); }, 1000); }; if (!document.querySelector('.PostFull__footer [title="Upvote"]')) { alert('Are you on steemit.com? In that case the bookmarklet may have stopped working. Please contact @lantto for an updated version.'); } else { run( parseInt(prompt('Enter at which minute mark it should upvote (e.g. 10, 15, 30 etc):')), document.title, false ); } })();

If you don't see your bookmarks bar you can enable it with Ctrl+Shift+B/Cmd+Shift+B in Chrome.

Full uncompressed source code can be found here.

Why?

When voting on Steemit you get curation rewards for upvoting content early. However, there's a rule in place reducing your reward if you vote too soon. This uses a linear model where you get 0% reward if you vote immediately as its posted, 50% if you vote after 15 minutes and 100% if you vote after 30 minutes or later.

Here is a good article by @liberosist describing this in detail.

When to use this instead of Steemit CountDown?

For most cases you will probably want to monitor the post manually before voting. Steemit CountDown is great for this as you can check out the post now and then to see how it's going. If it's few people who have voted for something you think may become viral it's better to wait and minimize the penalty.

However, sometimes you find an article where you just want to vote after a certain time. In those cases it's nice to set the timer and have it vote automatically.

Disclaimer

I would suggest double-checking that the vote went through before closing the tab. If steemit.com changes its website structure the bookmarklet may stop working and you will need to update it. In that case take a look at my blog for updates or give me a shout and I'll hit you up with a new version.


steemlets.com | steemroll.io

If you like my tools please give me a follow! @lantto

Authors get paid when people like you upvote their post.
Join our amazing community to comment and reward others.
Sort Order:  trending
71
  ·  10 months ago

Here's an update since they added the weight vote selector:

javascript:(function() { function setTitle(voteAt, minutesAgo, originalTitle) { var voteIn = voteAt - minutesAgo; var unit = (voteIn === 1 ? 'minute' : 'minutes'); var newTitle = '<Votes in ' + voteIn + ' ' + unit + '> | ' + originalTitle; if (document.title !== newTitle) { document.title = newTitle; } }; function run(voteAt, originalTitle, voted) { if (!voteAt) { return; } voteAt = parseInt(voteAt); if (document.title.indexOf(originalTitle) === -1) { return; } var timeParts = document.getElementsByTagName('time')[0].innerHTML.split(' '); if (timeParts[1].indexOf('minute') !== -1) { var minutesAgo = parseInt(timeParts[0]); if (minutesAgo >= voteAt) { if (!voted) { document.querySelector('.PostFull__footer [title="Upvote"]').click(); document.querySelector('.confirm_weight').click(); voted = true; }; document.title = '<Upvoted!> | ' + originalTitle; } else { setTitle(voteAt, minutesAgo, originalTitle); } } else { setTitle(voteAt, 0, originalTitle); } setTimeout(function() { run(voteAt, originalTitle, voted); }, 1000); }; if (!document.querySelector('.PostFull__footer [title="Upvote"]')) { alert('Are you on steemit.com? In that case the bookmarklet may have stopped working. Please contact @lantto for an updated version.'); } else { run( parseInt(prompt('Enter at which minute mark it should upvote (e.g. 10, 15, 30 etc):')), document.title, false ); } })();

I added this line:

 document.querySelector('.confirm_weight').click(); 

before

voted = true;
54
  ·  10 months ago

Really clever tool. I like it.

·
54
  ·  10 months ago

Thanks a lot!

68
  ·  10 months ago

This is great! I'll be using it regularly. :)

·
54
  ·  10 months ago

Thanks a lot. :) Glad you like it!

64
  ·  10 months ago

great job!

·
54
  ·  10 months ago

Thank you! Did we come to any conclusion about the followers-ordered-by-latest thing btw?

·
·
64
  ·  10 months ago

it seems not, i would still love to have this at some stage. Lets see if the developers release this feature anytime soon

58
  ·  10 months ago

As others have already said, clever tool and very useful! But I have a question, if I were to want to just vote always at a certain minute mark, for example 30 min in this case without any prompts, how should I edit the code?

·
54
  ·  10 months ago

Thanks! Use this code instead:

javascript:(function() { function setTitle(voteAt, minutesAgo, originalTitle) { var voteIn = voteAt - minutesAgo; var unit = (voteIn === 1 ? 'minute' : 'minutes'); var newTitle = '<Votes in ' + voteIn + ' ' + unit + '> | ' + originalTitle; if (document.title !== newTitle) { document.title = newTitle; } }; function run(voteAt, originalTitle, voted) { if (!voteAt) { return; } voteAt = parseInt(voteAt); if (document.title.indexOf(originalTitle) === -1) { return; } var timeParts = document.getElementsByTagName('time')[0].innerHTML.split(' '); if (timeParts[1].indexOf('minute') !== -1) { var minutesAgo = parseInt(timeParts[0]); if (minutesAgo >= voteAt) { if (!voted) { document.querySelector('.PostFull__footer [title="Upvote"]').click(); voted = true; }; document.title = '<Upvoted!> | ' + originalTitle; } else { setTitle(voteAt, minutesAgo, originalTitle); } } else { setTitle(voteAt, 0, originalTitle); } setTimeout(function() { run(voteAt, originalTitle, voted); }, 1000); }; if (!document.querySelector('.PostFull__footer [title="Upvote"]')) { alert('Are you on steemit.com? In that case the bookmarklet may have stopped working. Please contact @lantto for an updated version.'); } else { run( 30, document.title, false ); } })();

The very last part run( 30, document.title, false ); decides. So just replace that with whatever you want.

I may actually make a separate bookmarklet which is simpler and just votes at the 30 mark as that's the most common use case (I believe). Great suggestion anyway!

58
  ·  10 months ago

Nice! Putting this in my steemit tools folder. Thank you for the resource. :)

·
54
  ·  10 months ago

Glad to hear that. No problem! :)

69
  ·  10 months ago

it gonna become extremely useful as more people follow more people and the feed gets cloggy :)

42
  ·  10 months ago

Thanks for the information automatically vote, it was very useful for me

·
54
  ·  10 months ago

No problem. Glad you found it useful! :)

·
·
42
  ·  10 months ago

it was very nice, may be useful for everyone

55
  ·  10 months ago

Interesting. I'm new and had no idea there were different payouts depending on when you voted. I'm still learning.

71
  ·  10 months ago

Very cool! I made a modification to the Steemit Countdown to send me an alert, but I like this idea much better. I'll check it out.

70
  ·  10 months ago

Upvoted

58
  ·  10 months ago

Great post! Thank you.

64
  ·  10 months ago

Fantastic! And thanks for the mention of Steemit CountDown!

49
  ·  10 months ago

someone can do the same for Firefox?

58
  ·  10 months ago

You are a hero among common folk ;)
Thank you for helping add to my steemit tools!