Created
June 12, 2018 17:35
-
-
Save nataliastanko/ef0be1e6328445cfb78f1c2e643a62b6 to your computer and use it in GitHub Desktop.
Delete all event free orders on Eventbrite -> Event -> Manage Attendees -> Orders page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
if (document.getElementsByClassName('js-d-select-box').length === 0) { | |
throw new Error("No more orders! App stoped arbitrarily."); | |
} | |
Array.from(document.getElementsByClassName('js-d-select-box')).forEach( | |
function(currentSelect, index, arr) { | |
if (currentSelect.getAttribute('data-automation') == 'order-actions-select') { | |
Array.from(currentSelect.children).forEach( | |
function(currentOption, index, arr) { | |
if (currentOption.getAttribute('data-automation') == 'order-delete') { | |
currentSelect.selectedIndex = index; | |
currentOption.selected = true; | |
currentSelect.onchange(); | |
} | |
} | |
); | |
} | |
} | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment