Skip to content
Advertisement

JavaScript – Click all buttons with Class Name after 5 seconds (Twitter)

I’ve been trying to get my script to work for ages now, and it just won’t have it! I’m trying to click all the ‘unfollow button’s on my Twitter/Following page after 5 seconds. Here’s my code without the setInterval function:

JavaScript

Here’s Twitters HTML DOM code for the unfollow buttons:

JavaScript

I’d be so appreciated if someone could amend my code! Thank you so much in advance!

Advertisement

Answer

Change buttonArray[0].click() to buttonArray[a].click().

Advertisement