Ever forget you voted to delete something and ended up retracting your vote accidentally?
Well, so have a bunch of other people, myself included, so let's make that a bit more obvious.
This script renames the "Delete" button to "Retract Delete" if you've already voted to delete a particular post, making it more obvious that you've already voted. The same will occur with the "Undelete" button.
It also makes the prompts when clicking this button more obvious that you're retracting a vote, rather than casting one.
For keyboard shortcut users, the simple alert modal is replaced with a Stacks
showConfirmModal that's very in-your-face and defaults to "Cancel" to prevent muscle-memory from doing something you might not have wanted to do.
The same treatment is given to reopen votes, as the confirmation dialog presented to the user isn't eye-catchingly different enough when you're about to retract a reopen vote:
Most script managers should be able to run this without any issues. I've only tested Tampermonkey and Violentmonkey, though.