Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //StackEgg JS bot
- //paste into your browser console (probably F12 to open), definitely works in Chrome
- //stop with clearInterval(egger)
- (function() {
- var time = $('#egg-clock-text')
- var actions = $('.egg-action')
- function vote() {
- if (time.text() != '1')
- return
- var votes = [], buttons = []
- actions.each(function() {
- var t = $(this)
- votes.push(parseInt(t.find('.egg-action-tally').attr('title')) | 0)
- buttons.push(t.find('button'))
- })
- var maxIndex = 0
- for(var i = 0; i < votes.length; i++) {
- if (votes[i] > votes[maxIndex])
- maxIndex = i
- }
- console.log('Voted for ' + buttons[maxIndex].text())
- buttons[maxIndex].click()
- }
- vote()
- egger = setInterval(vote, 500)
- })()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement