You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open the Developer Console. (COMMAND+ALT+I on Mac)
Paste this into the Developer Console and run it
(()=>{const$followButtons='[data-testid$="-unfollow"]';const$confirmButton='[data-testid="confirmationSheetConfirm"]';constretry={count: 0,limit: 3,};constscrollToTheBottom=()=>window.scrollTo(0,document.body.scrollHeight);constretryLimitReached=()=>retry.count===retry.limit;constaddNewRetry=()=>retry.count++;constsleep=({ seconds })=>newPromise((proceed)=>{console.log(`WAITING FOR ${seconds} SECONDS...`);setTimeout(proceed,seconds*1000);});constunfollowAll=async(followButtons)=>{console.log(`UNFOLLOWING ${followButtons.length} USERS...`);awaitPromise.all(followButtons.map(async(followButton)=>{followButton&&followButton.click();awaitsleep({seconds: 1});constconfirmButton=document.querySelector($confirmButton);confirmButton&&confirmButton.click();}));};constnextBatch=async()=>{scrollToTheBottom();awaitsleep({seconds: 1});constfollowButtons=Array.from(document.querySelectorAll($followButtons));constfollowButtonsWereFound=followButtons.length>0;if(followButtonsWereFound){awaitunfollowAll(followButtons);awaitsleep({seconds: 2});returnnextBatch();}else{addNewRetry();}if(retryLimitReached()){console.log(`NO ACCOUNTS FOUND, SO I THINK WE'RE DONE`);console.log(`RELOAD PAGE AND RE-RUN SCRIPT IF ANY WERE MISSED`);}else{awaitsleep({seconds: 2});returnnextBatch();}};nextBatch();})();