Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » [v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- Chiroyce
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
Try playing the audio on a user event, otherwise autoplay blocking will block it
Also I'm currently looking through the source…
Also I'm currently looking through the source…
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- Chiroyce
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
Found the main issue, the reason the profile picture doesn't load is because you're fetching their Ocular ID, which is not the same as their Scratch ID. Try using a CORS proxy to get their actual ID from https://api.scratch.mit.edu/users/{username}
Also can you explain which lines of code is meant to deal with the query parameters? I can't seem to find it in the code…
The ID code is also wrong, thats why it returns undefined, this should fix it (won't return undefined but also won't return the Scratch ID)
Also can you explain which lines of code is meant to deal with the query parameters? I can't seem to find it in the code…
The ID code is also wrong, thats why it returns undefined, this should fix it (won't return undefined but also won't return the Scratch ID)
fetch('https://my-ocular.jeffalo.net/api/user/' + input) .then(res => res.json()) .then(data => { // grab "id" from the data let id = data._id; const img = "https://uploads.scratch.mit.edu/get_image/user/" + id + "_60x60.png"; $('#pfp').attr('src', img); }); }
Last edited by Chiroyce (March 31, 2022 03:12:56)
April Fools' topics:
— New Buildings in Scratch's headquarters
— Give every Scratcher an M1 MacBook Air
— Scratch should let users edit other Scratchers' projects
— Make a statue for Jeffalo
— Scratch Tech Tips™
— Make a Chiroyce statue emoji
<img src=“x” onerror=“alert('XSS vulnerability discovered')”>
this is a test sentence
- god286
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
Why are you converting topics??
Here are some of my followers!
I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
So much pain, effort, so much of it. And all I had to do was use https://my-ocular.jeffalo.net/api/user/USERNAME/picture instead!!
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- MagicCrayon9342
- Scratcher
1000+ posts
[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage
- Discussion Forums
- » Advanced Topics
- » [v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage