JSFiddle - React, Tailwind, and code Playground

by frogggeee McFrogggeee

JavaScript

let curators = prompt("what are the usernames of the users you want to invite?");
curators = curators.split(",");
let count = 0;
alert("Estimated AFK time: " + Math.round(curators.length / 10) + " seconds.");
for (let i = 0; i < curators.length; i++) {
	setTimeout(invite, (i * 100));
  
}
function invite() {
	$.ajax({
        url: '/site-api/users/curators-in/${Scratch.INIT_DATA.GALLERY.model.id}/invite_curator/?usernames=' + curators[count],
        type: 'PUT',
    });
	count++;
}