Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // As of the middle of May, 2018, I was able to use this in Chrome
- // to add the 600 something twitter users I follow to a list.
- //
- // Create a list called "Everyone".
- //
- // Go to your "Following" list. Scroll down until everyone has loaded.
- //
- // Scroll back up to the top.
- //
- // Paste the following into the Chrome DevTools Console and press
- // your Enter key.
- //
- // It may take a while, but when it finishes, everyone you follow should
- // be in your "Everyone" list, and you can see tweets in chronological order.
- //
- // It it's taking too long, or you want to stop the process, type 'cancel()'
- // in the console and hit Enter.
- function addEveryone() {
- let stopped = false;
- const addProf = (p, caller) => {
- p.getElementsByClassName('dropdown-toggle')[0].click();
- p
- .getElementsByClassName('list-text')[0]
- .getElementsByClassName('dropdown-link')[0]
- .click();
- setTimeout(() => {
- try {
- let addButton = Array.from(
- document.querySelectorAll(
- '#list-membership-dialog-body > div > ul li'
- )
- ).filter(item => item.innerText.indexOf('Everyone') != -1)[0];
- if (
- !addButton.getElementsByClassName('membership-checkbox')[0].dataset
- .isChecked
- ) {
- addButton.click();
- document
- .querySelector(
- '#list-membership-dialog-dialog > div.modal-content > button > span'
- )
- .click();
- console.log('added');
- caller();
- } else {
- document
- .querySelector(
- '#list-membership-dialog-dialog > div.modal-content > button > span'
- )
- .click();
- console.log('skipped');
- caller();
- }
- } catch (e) {
- console.log('erred');
- caller(p);
- }
- }, 100);
- };
- let profiles = Array.from(document.getElementsByClassName('ProfileCard'));
- function popper(failed) {
- if (failed) {
- profiles.push(failed);
- }
- if (profiles.length > 1 && !stopped) {
- addProf(profiles.shift(), popper);
- } else {
- return;
- }
- }
- popper();
- return () => (stopped = true);
- }
- cancel = addEveryone();
Add Comment
Please, Sign In to add comment