Discuss Scratch

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

It works when i set the value of #input manually in console but not automatically

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

bump

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…







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)

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


By the way, CORS with URL arguments is irelevant. As the issue is from the script not properly obtaining the arguments used in the typed URL.

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

Stuff to do
Fix URL arguments
Get more information on the page
Find reasons to use it over ocular

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

Getting the user ID works! now just how to get the pfp

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

The ID ocular has is DIFFERENT than the Scratch id

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

MyScratchPage 0.3 coming soon!

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage


The new UI is slick!

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

The latest development

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

The only new feature is a post count. No more features will be added, now its just bug fixes and polishing.

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

MyScratchPage v0.3 has released with the new UI! (the screenshots from earlier are out of date) here are new ones.

No user input


User input

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

Everything on your MyScratchPage page is from other services and APIs. I am unable to make any MyScratchPage specific APIs or information.

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

Turns out signatures are entirely parsable HTML so I can just include that in everyone's page!

MagicCrayon9342
Scratcher
1000+ posts

[v0.4.1] [v0.5.0 coming soon] [NEVER! Porting to NextJS (too hard)] MyScratchPage

Update: To prevent error, all HTML tags will be parsed out of the signature.

Powered by DjangoBB