From f035caa99a88c56538a68a87a6328d6f1c1ec77a Mon Sep 17 00:00:00 2001 From: onezDerv Date: Mon, 30 Sep 2024 05:33:54 -0400 Subject: [PATCH] finally i think it works now --- unfollow_all.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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();