Once you have cast your three votes, can you cancel one of them?
I know you can re-cast a vote for another candidate, but what if you'd like to withdraw one of your three votes because you are not confident about the others?
You can't cancel a vote directly, but you can do it indirectly by changing the position of a candidate you have already voted for to get the same result.
For example, assume that the candidate you do not want to vote for anymore is your current 3rd choice.
You now have 2 votes cast, one for your 1st choice, one for your 2nd choice, and no 3rd vote. You can choose to reuse it later if you so desire, or leave it empty.
Since you need to have at least 1 candidate to move into a slot in order to cancel another, you cannot cancel all of your votes. If you need to cancel all of your votes, then you can use the hack that timaschew discovered and/or support Braiam's feature request asking for this functionality to be explicitly added.
Like psubsee2003 explained you can withdraw one of your votes.
If you want to withdraw all your votes you can do it this way:
&voteIndex=1'
. Just set the number to 0
and press EnterYou should get this answer:
{"Success":false,"Message":"Invalid vote cast","NewScore":0}
Now go back to your browser and refresh the page ;)
votes
, plural. I refactored the answer. Of course my answer is explaining more than how to cancel one vote, but cancel all 3 votes is absolutely related to this question even if there are users who asking this in the comments.
Commented
Nov 21, 2015 at 19:44
I created the following userscript. It adds a ✘
link next to each vote. Clicking the link deletes the vote.
// This is where votes are displayed
var $votePicks = $(document.getElementById('vote-picks'));
// This link will be displayed next to each vote and will allow to delete it
var $deleteLink = $('<span> <a title="Delete vote">✘</a></span>').click(function() {
document
.querySelector('.candidate-row[data-candidate-id = "' + $(this).closest('div').data('candidate-id') + '"]')
.querySelector('.candidate-vote-button[data-index = "0"]')
.click();
});
// Rearrange elements in $votePicks and add deletion links
function addDeleteLinks() {
$votePicks.children('div').each(function() {
var $this = $(this);
$this.attr('data-candidate-id', ($this.find('a').prop('href').match(/\/(\d+)\//) || [])[1]);
$this.prevUntil('div').prependTo(this);
$this.next().appendTo(this);
$this.find('.label-key').append($deleteLink.clone(true));
});
}
// Hijack $.fn.html in order to call addDeleteLinks after $votePicks is overwritten.
var html = $.fn.html;
$.fn.html = function (value) {
var ret = html.apply(this, arguments);
if(value === void 0 || this.length !== 1 || this[0] !== $votePicks[0]) return ret;
addDeleteLinks();
};
// Also call addDeleteLinks at the beginning
addDeleteLinks();
// Add a hidden button next to each candidate. Clicking it will delete the vote for that candidate
$(document.querySelector('.candidate-vote-button')).clone(true).attr('data-index', 0).hide().val('Cancel vote').prependTo('.candidate-vote-buttons');
// Hijack showInfoMessage in order to detect successful deletion votes
var showInfoMessage = $.fn.showInfoMessage;
$.fn.showInfoMessage = function(msg) {
if(msg !== "Invalid vote cast" || this.length !== 1 || !this.hasClass('post-text')) return showInfoMessage.apply(this, arguments);
var $tr = this.closest('tr');
$votePicks.find('[data-candidate-id = "' + $tr.data('candidate-id') + '"]').remove();
$tr.find('.candidate-vote-button').removeClass('selected-choice not-selected-choice');
};
Supposing you vote X
as 1st Choice
, Y
as 2nd Choice
and Z
as 3rd Choice
and later you realize that R
would be a better second choice, all you need to do is go to R
's post and click the 2nd Choice
button.
It will automatically replace Y.
But once a vote is cast, there's no reversal.