You are viewing a single comment's thread from:

RE: Automatically upvote after X minutes (Steemit bookmarklet)

in #steemtools8 years 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;

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57574.67
ETH 2368.94
USDT 1.00
SBD 2.42