Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
// Load user profile page, if using RES scroll so many comments are loaded onto the page | |
// then enter the following in the browser's developer console. | |
// it will delete 1 post/comment every 1500ms | |
var $domNodeToIterateOver = $('.del-button .option .yes'), | |
currentTime = 0, | |
timeInterval = 1500; | |
$domNodeToIterateOver.each(function() { |
// Go to https://www.reddit.com/user/<username>/ and paste into your console. | |
// Reddit throttles these actions, hence the 1s timer. | |
let interval = setInterval(() => { | |
let deleteButtons = $('a.togglebutton[data-event-action="delete"]'); | |
if (deleteButtons.length === 0) { | |
clearInterval(interval); | |
if ($('.next-button > a')[0]) { | |
$('.next-button > a')[0].click(); | |
alert('Restart script.'); | |
} |