Skip to content

Instantly share code, notes, and snippets.

@JustGAST
Last active May 22, 2024 10:16
Show Gist options
  • Save JustGAST/39e3bdd8acbfa69f19a4f15110a64b12 to your computer and use it in GitHub Desktop.
Save JustGAST/39e3bdd8acbfa69f19a4f15110a64b12 to your computer and use it in GitHub Desktop.
Raindrop.io remove all empty collections. (Because raindrop have no ability to select multiple collections to delete them). Run in console on page app.raindrop.io
var elems = document.getElementsByClassName('collection');
for (let idx in elems) {
var elem = elems[idx];
var countElem = elem.querySelector('.count');
if (countElem.textContent !== "") {
continue;
}
var actionsElem = elem.querySelector('.actions');
if (!actionsElem) {
continue;
}
var actionsId = actionsElem.id;
var collectionId = actionsId.replace('side-collection-', '');
fetch('https://api.raindrop.io/v1/collection/'+collectionId, {
method: 'DELETE',
credentials: 'include',
})
.then(res => res.text())
.then(res => console.log(res));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment