Skip to content

Instantly share code, notes, and snippets.

@fakeheal
Created August 19, 2021 08:06
Show Gist options
  • Save fakeheal/69cc4282419b26331bb5432b7462933a to your computer and use it in GitHub Desktop.
Save fakeheal/69cc4282419b26331bb5432b7462933a to your computer and use it in GitHub Desktop.
const toRemove = [
'If You Need The Most Awesome Violin Music, Hear This •',
'Traitor',
'Revolution',
'Sacrifice',
'Endgame',
'Overlord',
'Darkness',
'A Soundtrack for the Apocalypse'
];
document.querySelectorAll('input[name="artist_name"]').forEach(function(element) {
if(toRemove.indexOf(element.value) !== -1 ) {
if (element.parentElement.hasChildNodes()) {
let children = element.parentElement;
for (let i = 0; i < children.length; i++) {
if(children[i].type === 'submit' && children[i].classList.contains('more-item--delete')) {
children[i].click();
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment