diff --git a/unfollow_all.js b/unfollow_all.js index 7893aa3..5bddedf 100644 --- a/unfollow_all.js +++ b/unfollow_all.js @@ -25,8 +25,18 @@ async function unfollowUser(user) { e = await fetch(`https://scratch.mit.edu/site-api/users/followers/${the}/remove/?usernames=${user}`, { "method": "PUT", "body": "{}", + "credentials": "include", "headers": { - "x-csrftoken": getCookie('scratchcsrftoken') + "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0", + "Accept": "application/json, text/javascript, */*; q=0.01", + "Accept-Language": "en-US,en;q=0.5", + "Content-Type": "application/json", + "x-csrftoken": getCookie('scratchcsrftoken'), + "X-Requested-With": "XMLHttpRequest", + "Sec-Fetch-Dest": "empty", + "Sec-Fetch-Mode": "cors", + "Sec-Fetch-Site": "same-origin", + "Priority": "u=0" } }); e = await e.text();