From 4733a91d50db7789ccd9607c921b431917b9281a Mon Sep 17 00:00:00 2001 From: MaterArc <105017592+MaterArc@users.noreply.github.com> Date: Thu, 3 Jul 2025 11:05:07 -0400 Subject: [PATCH 1/2] Fix Follow on Project --- features/follow-on-projects/script.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/features/follow-on-projects/script.js b/features/follow-on-projects/script.js index 7cbafa6c..6162ece9 100644 --- a/features/follow-on-projects/script.js +++ b/features/follow-on-projects/script.js @@ -30,11 +30,11 @@ export default async function ({ feature, console }) { (following ? "Unfollow" : "Follow") + " " + username; let data = await ( await fetch( - "https://scratch.mit.edu/site-api/users/followers/rgantzosTEST/remove/?usernames=" + + "https://scratch.mit.edu/site-api/users/followers/" + username + "/remove/?usernames=" + auth.user.username, { headers: { - "x-csrftoken": "VZ0lgYGuLZzG5nD4nNirmbbze7CulCmP", + "x-csrftoken": document.cookie.match(/scratchcsrftoken=([^;]+)/)?.[1], "x-requested-with": "XMLHttpRequest", }, referrer: "https://scratch.mit.edu/users/" + username + "/", @@ -53,15 +53,14 @@ export default async function ({ feature, console }) { (following ? "Unfollow" : "Follow") + " " + username; let data = await ( await fetch( - "https://scratch.mit.edu/site-api/users/followers/rgantzosTEST/add/?usernames=" + + "https://scratch.mit.edu/site-api/users/followers/" + username + "/add/?usernames=" + auth.user.username, { headers: { - "x-csrftoken": "VZ0lgYGuLZzG5nD4nNirmbbze7CulCmP", + "x-csrftoken": document.cookie.match(/scratchcsrftoken=([^;]+)/)?.[1], "x-requested-with": "XMLHttpRequest", }, referrer: "https://scratch.mit.edu/users/" + username + "/", - body: '{"id":"' + username + '"}', method: "PUT", mode: "cors", credentials: "include", From 7eb39e3391cc7bd35ee50c04685cfe045bd9aa51 Mon Sep 17 00:00:00 2001 From: rgantzos <86856959+rgantzos@users.noreply.github.com> Date: Sat, 2 Aug 2025 10:12:00 -0700 Subject: [PATCH 2/2] Update data.json --- features/follow-on-projects/data.json | 1 + 1 file changed, 1 insertion(+) diff --git a/features/follow-on-projects/data.json b/features/follow-on-projects/data.json index c48afd30..995a9938 100644 --- a/features/follow-on-projects/data.json +++ b/features/follow-on-projects/data.json @@ -2,6 +2,7 @@ "title": "Follow on Project Page", "description": "Follow users directly from the project page instead of going to their profile.", "credits": [ + { "username": "MaterArc", "url": "https://scratch.mit.edu/users/MaterArc/" }, { "username": "green_thing_game2", "url": "https://scratch.mit.edu/users/green_thing_game2/" }, { "username": "rgantzos", "url": "https://scratch.mit.edu/users/rgantzos/" } ],