Skip to content

Instantly share code, notes, and snippets.

@Sebazzz
Created April 8, 2018 08:27
Show Gist options
  • Save Sebazzz/d9c073d5f067d6e27473f94eea149d91 to your computer and use it in GitHub Desktop.
Save Sebazzz/d9c073d5f067d6e27473f94eea149d91 to your computer and use it in GitHub Desktop.
Sunday morning script: Bulk add all your followers to a list
ddtoggles = $('.ProfileCard-actions .dropdown > .dropdown-toggle').get()
function *bulkListAdd() {
let item = null;
while ((item = ddtoggles.pop())) {
let fullname = $(item).parents('.ProfileCard').find('.fullname').text();
console.log(fullname);
yield 1;
console.log('... open ddl');
$(item).click();
yield 1;
console.log('... open dlg');
$(item).parent().find('.list-text > button').click();
yield 1;
while ($('#list-membership-dialog .modal-btn.modal-close').is(':visible') == false) {
console.log('... wait dlg');
yield 1;
}
console.log('... toggle opt');
$('#list_982887873211969537').click();
yield 1;
console.log('... close dlg');
$('#list-membership-dialog .modal-btn.modal-close').click();
yield 1;
while ($('#list-membership-dialog .modal-btn.modal-close').is(':visible') == true) {
console.log('... wait dlg');
yield 1;
}
}
}
var it = bulkListAdd();
window.setInterval(() => it.next(), 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment