Last year I asked a question similar to the question I am asking here-
Create a Bookmarklet that clicks multiple buttons on one page
The accepted answer works perfectly on a page that uses jQuery. However I need to get something similar working on a page that doesn't load jQuery. I tried to insert jQuery into the page in the bookmarklet but it refuses to load (the website doesn't allow it).
How do I convert the following to pure Javascript so that I can click multiple buttons on the page?
(function(){
var UserFollowButton = $('button.UserFollowButton');
var index = UserFollowButton.length-1;
follow();
function follow(){
if(index >= 0){
$(UserFollowButton[index--]).click();
setTimeout(follow, 500);
}
}
})();