Updated: Vote in X Minutes Bookmarklet

in #steemtools4 years ago

4 Months ago @lantto created a great little script I've been using ever since which will automatically upvote a post after X minutes. I made a fix a few months ago and recently realized it needed some more fixes.

The bookmarklet lets you vote on a post exactly when you want to. Since curation rewards adjust in the first thirty minutes of a post (a portion of the curation rewards prior to thirty minutes will go directly to the author), it's sometimes advantageous to go through the newly created posts, open posts in their own tabs, read them, and use this script to automatically vote up your favorites later. As long as you keep the tab open, your vote will be recorded in the time you specify.

Here's the latest version for you to enjoy (copy this and save it as the URL of a bookmark):


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.querySelector('.PostFull__time_author_category span span').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"]') || !document.querySelector('.PostFull__time_author_category span span')) { alert('Are you on steemit.com? In that case the bookmarklet may have stopped working. Please contact @lukestokes 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 ); } })();



You can see @lantto's original post for more information on how this works and how to install it, but here's a quick summary and an animated gif showing it installed and used:




Things to remember:

  1. Don't ever install bookmarklets unless you trust the author and/or know what's going on (i.e. you undertand JavaScript). Someone could steal your account using JavaScript, so take this seriously.

  2. You have to keep the tab open until after the vote is recorded. If you close the tab or reload it, the vote will not be automatically recorded.

  3. If you have trouble, let me know, and I'll try to help you out.

I hope you find this as useful as I have. Manually curating good content is a lot of fun for me, so I enjoy using this little tool to help me out.



Luke Stokes is a father, husband, business owner, programmer, voluntaryist, and blockchain enthusiast. He wants to help create a world we all want to live in.

Sort:  

In hopes of others finding this post, and it being useful to them, I've added $5.10 in SBD to promote it.

Thanks, Luke. Appreciate it!

You're welcome!

And thanks to @dantheman for the vote love. :) :)

I used to love this till the vote slider came into being. Was that one of the fixes?

Yes, that was the first fix a few months ago I linked to in the post above. At that time I only added a comment to the original post. Glad to know it's more helpful to put out a separate post.

Fantastic stuff, thank you for this!!

Ah so good it works perfectly, thank you again!

Glad to hear it! :)

Ah, interesting! Our first potential bug.

Are you viewing an individual post?

What browser are you using?

Your post. Chrome.

Have you already voted on the post?

It's also possible if you're past the first sixty minutes, the script won't work. At that point you wouldn't need it anyway, just vote like normal.

Oh, yeah, I was just testing to see if it would work. Your post was already upvoted on lol.

Thanks for following up. Use it on some new stuff and enjoy. :)

Yup, tested works on non voted material.